@utils.arg('monitor_id', metavar='<monitor-id>', help='ID of the monitor to upload to an image')
@utils.arg('--force', metavar='<True|False>', help="Optional flag to indicate whether to upload a monitor even if it's attached to an instance. (Default=False)", default=False)
@utils.arg('--container-format', metavar='<container-format>', help='Optional type for container format (Default=bare)', default='bare')
@utils.arg('--disk-format', metavar='<disk-format>', help='Optional type for disk format (Default=raw)', default='raw')
@utils.arg('image_name', metavar='<image-name>', help='Name for created image')
@utils.service_type('monitor')
def do_upload_to_image(cs, args):
 monitor = _find_monitor(cs, args.monitor_id)
 monitor.upload_to_image(args.force, args.image_name, args.container_format, args.disk_format)

@ utils . arg ( 'monitor_id' , metavar = '<monitor-id>' , help = 'ID of the monitor to upload to an image' ) @ utils . arg ( '--force' , metavar = '<True|False>' , help = "Optional flag to indicate whether to upload a monitor even if it's attached to an instance. (Default=False)" , default = False ) @ utils . arg ( '--container-format' , metavar = '<container-format>' , help = 'Optional type for container format (Default=bare)' , default = 'bare' ) @ utils . arg ( '--disk-format' , metavar = '<disk-format>' , help = 'Optional type for disk format (Default=raw)' , default = 'raw' ) @ utils . arg ( 'image_name' , metavar = '<image-name>' , help = 'Name for created image' ) @ utils . service_type ( 'monitor' ) def do_upload_to_image ( cs , args ) : monitor = _find_monitor ( cs , args . monitor_id ) monitor . upload_to_image ( args . force , args . image_name , args . container_format , args . disk_format )
upload monitor to image service as image .