Exemplo n.º 1
0
    def teardown(self, blueprint_id):
        """
        Destroys blueprint storage once it is not needed
        Parameters
        ----------
        blueprint_id: str

        Returns
        -------

        """
        blueprint_storage = utils.storage_dir(
            blueprint_id, storage_path=self._storage_path)
        shutil.rmtree(blueprint_storage, ignore_errors=True)
Exemplo n.º 2
0
def init_blueprint_storage(blueprint_id, storage_path=None):
    _env_path = utils.storage_dir(blueprint_id, storage_path=storage_path)
    if not os.path.exists(_env_path):
        os.makedirs(_env_path)
    return futures.aria_local.FileStorage(storage_dir=_env_path)