@@ -191,6 +191,7 @@ def get_parser(self, prog_name):
191191 action = 'store_true' ,
192192 help = _ ('Return existing role' ),
193193 )
194+ common .add_resource_option_to_parser (parser )
194195 return parser
195196
196197 def take_action (self , parsed_args ):
@@ -201,10 +202,12 @@ def take_action(self, parsed_args):
201202 domain_id = common .find_domain (identity_client ,
202203 parsed_args .domain ).id
203204
205+ options = common .get_immutable_options (parsed_args )
206+
204207 try :
205208 role = identity_client .roles .create (
206209 name = parsed_args .name , domain = domain_id ,
207- description = parsed_args .description )
210+ description = parsed_args .description , options = options )
208211
209212 except ks_exc .Conflict :
210213 if parsed_args .or_show :
@@ -366,6 +369,7 @@ def get_parser(self, prog_name):
366369 metavar = '<name>' ,
367370 help = _ ('Set role name' ),
368371 )
372+ common .add_resource_option_to_parser (parser )
369373 return parser
370374
371375 def take_action (self , parsed_args ):
@@ -376,12 +380,14 @@ def take_action(self, parsed_args):
376380 domain_id = common .find_domain (identity_client ,
377381 parsed_args .domain ).id
378382
383+ options = common .get_immutable_options (parsed_args )
379384 role = utils .find_resource (identity_client .roles ,
380385 parsed_args .role ,
381386 domain_id = domain_id )
382387
383388 identity_client .roles .update (role .id , name = parsed_args .name ,
384- description = parsed_args .description )
389+ description = parsed_args .description ,
390+ options = options )
385391
386392
387393class ShowRole (command .ShowOne ):
0 commit comments