-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In addition to include_devices and exclude_devices, add options for backup_only_devices and restore_only_devices for files. When evaluating if a file should be acted upon, consider devices in the corresponding category as well.
Code to modify below.
In sync.py,
if ftconfig.sync in [BACKUP]:
includes = ['include_devices', 'backup_only_devices']
elif ftconfig.sync in [STATUS, RESTORE]:
includes = ['include_devices', 'restore_only_devices']
include_devices_all = [cfile.yaml_file[x] for x in includes if include in cfile.yaml_file
# Check if file is for this device
if len(include_devices_all):
if cdevice.device_id not in include_devices_all:
logging.debug('Skipping %s, host not in included list',
cfile.file_id)
return SKIP
elif 'exclude_devices' in cfile.yaml_file:
if cdevice.device_id in cfile.yaml_file['exclude_devices']:
logging.debug('Skipping %s, host in excluded list',
cfile.file_id)
return SKIPReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request