added --standalone and --disp shortcuts
This commit is contained in:
parent
0b47df2b54
commit
e55b530865
@ -43,6 +43,14 @@ parser.add_argument('--class', '-C', dest='cls',
|
||||
default='AppVM',
|
||||
help='specify the class of the new domain (default: %(default)s)')
|
||||
|
||||
parser.add_argument('--standalone',
|
||||
action="store_true",
|
||||
help=' shortcut for --class StandaloneVM')
|
||||
|
||||
parser.add_argument('--disp'
|
||||
action=qubesadmin.tools.SinglePropertyAction,
|
||||
help='alias for --class DispVM --label red --template <argument or default DVM>')
|
||||
|
||||
parser.add_argument('--property', '--prop',
|
||||
action=qubesadmin.tools.PropertyAction,
|
||||
help='set domain\'s property, like "internal", "memory" or "vcpus"')
|
||||
@ -113,6 +121,14 @@ def main(args=None, app=None):
|
||||
if args.one_pool:
|
||||
pool = args.one_pool
|
||||
|
||||
if 'disp' in args.properties:
|
||||
args.properties.setdefault('label', 'red')
|
||||
args.cls = 'DispVM'
|
||||
args.properties.setdefault('template', args.properties['disp'])
|
||||
|
||||
if 'standalone' in args.properties:
|
||||
args.cls = 'StandaloneVM'
|
||||
|
||||
if 'label' not in args.properties:
|
||||
parser.error('--label option is mandatory')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user