@utils.arg('image', metavar='<image>', help=_('Name or ID of image.'))
@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 add/update or delete (only key is necessary on delete).'))
@deprecated_image
def do_image_meta(cs, args):
 image = _find_image(cs, args.image)
 metadata = _extract_metadata(args)
 if (args.action == 'set'):
  cs.images.set_meta(image, metadata)
 elif (args.action == 'delete'):
  cs.images.delete_meta(image, metadata.keys())

@ utils . arg ( 'image' , metavar = '<image>' , help = _ ( 'Name or ID of image.' ) ) @ 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 add/update or delete (only key is necessary on delete).' ) ) @ deprecated_image def do_image_meta ( cs , args ) : image = _find_image ( cs , args . image ) metadata = _extract_metadata ( args ) if ( args . action == 'set' ) : cs . images . set_meta ( image , metadata ) elif ( args . action == 'delete' ) : cs . images . delete_meta ( image , metadata . keys ( ) )
set or delete metadata on an image .