Adds support for --ignore-errors
to qvm-clone CLI
The underlying API already supported the `ignore_errors` param in Python, now we just expose that option to the `qvm-clone` CLI.
This commit is contained in:
parent
2f1be16635
commit
55a22e7955
@ -37,6 +37,10 @@ parser.add_argument('--class', '-C', dest='cls',
|
|||||||
default=None,
|
default=None,
|
||||||
help='specify the class of the new domain (default: same as source)')
|
help='specify the class of the new domain (default: same as source)')
|
||||||
|
|
||||||
|
parser.add_argument('--ignore-errors', action='store_true',
|
||||||
|
default=False,
|
||||||
|
help='log errors encountered during setting metadata, but continue clone operation')
|
||||||
|
|
||||||
group = parser.add_mutually_exclusive_group()
|
group = parser.add_mutually_exclusive_group()
|
||||||
group.add_argument('-P',
|
group.add_argument('-P',
|
||||||
metavar='POOL',
|
metavar='POOL',
|
||||||
@ -72,7 +76,7 @@ def main(args=None, app=None):
|
|||||||
'Pool argument must be of form: -P volume_name=pool_name')
|
'Pool argument must be of form: -P volume_name=pool_name')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
app.clone_vm(src_vm, new_name, new_cls=args.cls, pool=pool, pools=pools)
|
app.clone_vm(src_vm, new_name, new_cls=args.cls, pool=pool, pools=pools, ignore_errors=args.ignore_errors)
|
||||||
except qubesadmin.exc.QubesException as e:
|
except qubesadmin.exc.QubesException as e:
|
||||||
parser.error_runtime(e)
|
parser.error_runtime(e)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user