@utils.arg('server', metavar='<server>', help=_('Name or ID of server.'))
@utils.arg('action', metavar='<action>', choices=['set', 'delete'], help=_("Actions: 'set' or 'delete'."))
@utils.arg('metadata', metavar='<key=value>', nargs='+', action='append', default=[], help=_('Metadata to set or delete (only key is necessary on delete).'))
def do_meta(cs, args):
 server = _find_server(cs, args.server)
 metadata = _extract_metadata(args)
 if (args.action == 'set'):
  cs.servers.set_meta(server, metadata)
 elif (args.action == 'delete'):
  cs.servers.delete_meta(server, sorted(metadata.keys(), reverse=True))

@ utils . arg ( 'server' , metavar = '<server>' , help = _ ( 'Name or ID of server.' ) ) @ utils . arg ( 'action' , metavar = '<action>' , choices = [ 'set' , 'delete' ] , help = _ ( "Actions: 'set' or 'delete'." ) ) @ utils . arg ( 'metadata' , metavar = '<key=value>' , nargs = '+' , action = 'append' , default = [ ] , help = _ ( 'Metadata to set or delete (only key is necessary on delete).' ) ) def do_meta ( cs , args ) : server = _find_server ( cs , args . server ) metadata = _extract_metadata ( args ) if ( args . action == 'set' ) : cs . servers . set_meta ( server , metadata ) elif ( args . action == 'delete' ) : cs . servers . delete_meta ( server , sorted ( metadata . keys ( ) , reverse = True ) )
set or delete metadata on a server .