How to use the flintrock.core.StorageDirs function in Flintrock

To help you get started, we’ve selected a few Flintrock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nchammas / flintrock / flintrock / core.py View on Github external
""")

        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
github nchammas / flintrock / flintrock / core.py View on Github external
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 = []