@utils.arg('vtype', metavar='<vtype>', help='Name or ID of the monitor type')
@utils.arg('action', metavar='<action>', choices=['set', 'unset'], help="Actions: 'set' or 'unset'")
@utils.arg('metadata', metavar='<key=value>', nargs='*', default=None, help='Extra_specs to set/unset (only key is necessary on unset)')
@utils.service_type('monitor')
def do_type_key(cs, args):
 vtype = _find_monitor_type(cs, args.vtype)
 if (args.metadata is not None):
  keypair = _extract_metadata(args)
  if (args.action == 'set'):
   vtype.set_keys(keypair)
  elif (args.action == 'unset'):
   vtype.unset_keys(keypair.keys())

@ utils . arg ( 'vtype' , metavar = '<vtype>' , help = 'Name or ID of the monitor type' ) @ utils . arg ( 'action' , metavar = '<action>' , choices = [ 'set' , 'unset' ] , help = "Actions: 'set' or 'unset'" ) @ utils . arg ( 'metadata' , metavar = '<key=value>' , nargs = '*' , default = None , help = 'Extra_specs to set/unset (only key is necessary on unset)' ) @ utils . service_type ( 'monitor' ) def do_type_key ( cs , args ) : vtype = _find_monitor_type ( cs , args . vtype ) if ( args . metadata is not None ) : keypair = _extract_metadata ( args ) if ( args . action == 'set' ) : vtype . set_keys ( keypair ) elif ( args . action == 'unset' ) : vtype . unset_keys ( keypair . keys ( ) )
set or unset extra_spec for a monitor type .