#NEWLINE# @ utils . arg ( '-n' , '--name' , metavar = '<NAME>' , help = _ ( 'The new name for the profile.' ) ) #NEWLINE# @ utils . arg ( '-M' , '--metadata' , metavar = '<KEY1=VALUE1;KEY2=VALUE2...>' , help = _ ( 'Metadata values to be attached to the profile. This can be specified multiple times, or once with key-value pairs separated by a semicolon.' ) , action = 'append' ) #NEWLINE# @ utils . arg ( 'id' , metavar = '<PROFILE_ID>' , help = _ ( 'Name or ID of the profile to update.' ) ) #NEWLINE# def do_profile_update( service , args ) : #NEWLINE# #INDENT# 'Update a profile.' #NEWLINE# show_deprecated ( 'senlin profile-update' , 'openstack cluster profile update' ) #NEWLINE# params = { #NEWLINE# #INDENT# 'name' : args . name , #NEWLINE# #UNINDENT# } #NEWLINE# if args . metadata : #NEWLINE# #INDENT# params [ 'metadata' ] = utils . format_parameters ( args . metadata ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# profile = service . get_profile ( args . id ) #NEWLINE# #UNINDENT# except sdk_exc . ResourceNotFound : #NEWLINE# #INDENT# raise exc . CommandError ( ( _ ( 'Profile not found: %s' ) % args . id ) ) #NEWLINE# #UNINDENT# service . update_profile ( profile . id , ** params ) #NEWLINE# _show_profile ( service , profile . id )