File tree Expand file tree Collapse file tree
openstackclient/identity/v3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,11 +137,11 @@ def get_parser(self, prog_name):
137137 def take_action (self , parsed_args ):
138138 self .log .debug ('take_action(%s)' , parsed_args )
139139 identity_client = self .app .client_manager .identity
140+
141+ domain = None
140142 if parsed_args .domain :
141143 domain = common .find_domain (identity_client ,
142144 parsed_args .domain ).id
143- else :
144- domain = None
145145
146146 try :
147147 group = identity_client .groups .create (
@@ -228,11 +228,10 @@ def take_action(self, parsed_args):
228228 self .log .debug ('take_action(%s)' , parsed_args )
229229 identity_client = self .app .client_manager .identity
230230
231+ domain = None
231232 if parsed_args .domain :
232233 domain = common .find_domain (identity_client ,
233234 parsed_args .domain ).id
234- else :
235- domain = None
236235
237236 if parsed_args .user :
238237 user = utils .find_resource (
Original file line number Diff line number Diff line change @@ -80,11 +80,10 @@ def take_action(self, parsed_args):
8080 self .log .debug ('take_action(%s)' , parsed_args )
8181 identity_client = self .app .client_manager .identity
8282
83+ domain = None
8384 if parsed_args .domain :
8485 domain = common .find_domain (identity_client ,
8586 parsed_args .domain ).id
86- else :
87- domain = None
8887
8988 enabled = True
9089 if parsed_args .disable :
Original file line number Diff line number Diff line change @@ -92,23 +92,20 @@ def take_action(self, parsed_args):
9292 self .log .debug ('take_action(%s)' % parsed_args )
9393 identity_client = self .app .client_manager .identity
9494
95+ project_domain = None
9596 if parsed_args .project_domain :
9697 project_domain = common .find_domain (identity_client ,
9798 parsed_args .project_domain ).id
98- else :
99- project_domain = None
10099
100+ trustor_domain = None
101101 if parsed_args .trustor_domain :
102102 trustor_domain = common .find_domain (identity_client ,
103103 parsed_args .trustor_domain ).id
104- else :
105- trustor_domain = None
106104
105+ trustee_domain = None
107106 if parsed_args .trustee_domain :
108107 trustee_domain = common .find_domain (identity_client ,
109108 parsed_args .trustee_domain ).id
110- else :
111- trustee_domain = None
112109
113110 # NOTE(stevemar): Find the two users, project and roles that
114111 # are necessary for making a trust usable, the API dictates that
Original file line number Diff line number Diff line change @@ -94,19 +94,17 @@ def take_action(self, parsed_args):
9494 self .log .debug ('take_action(%s)' , parsed_args )
9595 identity_client = self .app .client_manager .identity
9696
97+ project_id = None
9798 if parsed_args .project :
9899 project_id = utils .find_resource (
99100 identity_client .projects ,
100101 parsed_args .project ,
101102 ).id
102- else :
103- project_id = None
104103
104+ domain_id = None
105105 if parsed_args .domain :
106106 domain_id = common .find_domain (identity_client ,
107107 parsed_args .domain ).id
108- else :
109- domain_id = None
110108
111109 enabled = True
112110 if parsed_args .disable :
@@ -211,11 +209,10 @@ def take_action(self, parsed_args):
211209 self .log .debug ('take_action(%s)' , parsed_args )
212210 identity_client = self .app .client_manager .identity
213211
212+ domain = None
214213 if parsed_args .domain :
215214 domain = common .find_domain (identity_client ,
216215 parsed_args .domain ).id
217- else :
218- domain = None
219216
220217 if parsed_args .group :
221218 group = utils .find_resource (
You can’t perform that action at this time.
0 commit comments