This is an automated email from the ASF dual-hosted git repository.

mykolabodnar pushed a commit to branch DLAB-13xx_versions
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-13xx_versions by this 
push:
     new 9be5e7d  debug changes
9be5e7d is described below

commit 9be5e7d82b2f6264b65f6e0926eda7cb2c02d20e
Author: Mykola_Bodnar1 <bodnarmyk...@gmail.com>
AuthorDate: Wed Dec 11 12:20:17 2019 +0200

    debug changes
---
 .../src/general/lib/gcp/actions_lib.py                       | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
index 02c5f51..c647a15 100644
--- a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
@@ -554,22 +554,34 @@ class GCPActions:
 
     def set_role_to_service_account(self, service_account_name, role_name, 
role_type='custom'):
         request = 
GCPActions().service_resource.projects().getIamPolicy(resource=self.project, 
body={})
+        print('log1')
+        print(request)
         project_policy = request.execute()
+        print('log2')
+        print(project_policy)
         service_account_email = 
"{}@{}.iam.gserviceaccount.com".format(service_account_name, self.project)
+        print('log3')
+        print(service_account_email)
         params = {
             "role": "projects/{}/roles/{}".format(self.project, 
role_name.replace('-', '_')),
             "members": [
                 "serviceAccount:{}".format(service_account_email)
             ]
         }
+        print('log4')
+        print(params)
         if role_type == 'predefined':
             params['role'] = "roles/{}".format(role_name)
         project_policy['bindings'].append(params)
+        print('log5')
+        print(project_policy)
         params = {
             "policy": {
                 "bindings": project_policy['bindings']
             }
         }
+        print('log6')
+        print(params)
         request = 
self.service_resource.projects().setIamPolicy(resource=self.project, 
body=params)
         try:
             return request.execute()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org

Reply via email to