Allow include=None to be passed to admin.backup.Info
This is forwarded to qubes.backup.Backup(), which uses None to choose VMs according to their include_in_backups property. ('git show -w' recommended)
This commit is contained in:
parent
dbaf60ca24
commit
59abdeb30e
@ -1293,6 +1293,7 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI):
|
|||||||
dest_vm = profile_data['destination_vm']
|
dest_vm = profile_data['destination_vm']
|
||||||
dest_path = profile_data['destination_path']
|
dest_path = profile_data['destination_path']
|
||||||
include_vms = profile_data['include']
|
include_vms = profile_data['include']
|
||||||
|
if include_vms is not None:
|
||||||
# convert old keywords to new keywords
|
# convert old keywords to new keywords
|
||||||
include_vms = [vm.replace('$', '@') for vm in include_vms]
|
include_vms = [vm.replace('$', '@') for vm in include_vms]
|
||||||
exclude_vms = profile_data.get('exclude', [])
|
exclude_vms = profile_data.get('exclude', [])
|
||||||
@ -1339,6 +1340,9 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI):
|
|||||||
'specify passphrase_text or passphrase_vm')
|
'specify passphrase_text or passphrase_vm')
|
||||||
|
|
||||||
# handle include
|
# handle include
|
||||||
|
if include_vms is None:
|
||||||
|
vms_to_backup = None
|
||||||
|
else:
|
||||||
vms_to_backup = set(vm for vm in self.app.domains
|
vms_to_backup = set(vm for vm in self.app.domains
|
||||||
if any(qubes.utils.match_vm_name_with_special(vm, name)
|
if any(qubes.utils.match_vm_name_with_special(vm, name)
|
||||||
for name in include_vms))
|
for name in include_vms))
|
||||||
|
Loading…
Reference in New Issue
Block a user