@utils.arg('flavor', metavar='<flavor>', help=_('Name or ID of flavor.'))
@utils.arg('action', metavar='<action>', choices=['set', 'unset'], help=_("Actions: 'set' or 'unset'."))
@utils.arg('metadata', metavar='<key=value>', nargs='+', action='append', default=[], help=_('Extra_specs to set/unset (only key is necessary on unset).'))
def do_flavor_key(cs, args):
 flavor = _find_flavor(cs, args.flavor)
 keypair = _extract_metadata(args)
 if (args.action == 'set'):
  flavor.set_keys(keypair)
 elif (args.action == 'unset'):
  flavor.unset_keys(keypair.keys())

@ utils . arg ( 'flavor' , metavar = '<flavor>' , help = _ ( 'Name or ID of flavor.' ) ) @ utils . arg ( 'action' , metavar = '<action>' , choices = [ 'set' , 'unset' ] , help = _ ( "Actions: 'set' or 'unset'." ) ) @ utils . arg ( 'metadata' , metavar = '<key=value>' , nargs = '+' , action = 'append' , default = [ ] , help = _ ( 'Extra_specs to set/unset (only key is necessary on unset).' ) ) def do_flavor_key ( cs , args ) : flavor = _find_flavor ( cs , args . flavor ) keypair = _extract_metadata ( args ) if ( args . action == 'set' ) : flavor . set_keys ( keypair ) elif ( args . action == 'unset' ) : flavor . unset_keys ( keypair . keys ( ) )
set or unset extra_spec for a flavor .