backups: Implement disabling web configuration during backup

- Introduce a BackupApp class to store all information about application being
  backed up. This cleans up apps lists vs. manifest lists spread out in the
  code.

- Introduce ServiceHandler to abstract dealing with services and web
  configuration.

- Add enable and disable actions in apache action.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati authored and James Valleroy committed 2018-10-08 18:28:54 -04:00
1 parent 5ee0f71e62
commit b18a80f0f2
6 files changed
+279 -166

No files matched your search

+4 -4
View File
@@ -86,10 +86,10 @@ def _backup_handler(packet):
manifest_path = os.path.join(MANIFESTS_FOLDER,
get_valid_filename(packet.label) + '.json')
manifests = [{
'name': manifest[0],
'version': manifest[1].version,
'backup': manifest[2]
} for manifest in packet.manifests]
'name': app.name,
'version': app.app.version,
'backup': app.manifest
} for app in packet.apps]
with open(manifest_path, 'w') as manifest_file:
json.dump(manifests, manifest_file)