Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
""")
manifest = json.loads(manifest_raw)
self.ssh_key_pair = SSHKeyPair(
public=manifest['ssh_key_pair']['public'],
private=manifest['ssh_key_pair']['private'])
services = []
for [service_name, manifest] in manifest['services']:
# TODO: Expose the classes being used here.
service = globals()[service_name](**manifest)
services.append(service)
self.services = services
storage_dirs = StorageDirs(
root='/media/root',
ephemeral=sorted(ephemeral_dirs_raw.splitlines()),
persistent=None)
self.storage_dirs = storage_dirs
def __init__(
self,
*,
name,
ssh_key_pair=None,
storage_dirs=StorageDirs(root=None, ephemeral=None, persistent=None)):
self.name = name
self.ssh_key_pair = ssh_key_pair
self.storage_dirs = storage_dirs
self.services = []