Exemple #1
0
def drop_storage(alias: str, force: bool):
    """Drops a storage. The storage must be empty."""
    manage.drop_storage(storages.storage(alias), force=force)
Exemple #2
0
def __(alias: str, force: bool = False):
    drop_storage(storages.storage(alias), force=force)
Exemple #3
0
def ensure_storage(alias: str):
    """Creates the storage if it do not exist"""
    manage.ensure_storage(storages.storage(alias))
Exemple #4
0
def __(alias: str):
    ensure_storage(storages.storage(alias))
Exemple #5
0
def __(alias: str, file_name: str):
    return file_exists(storages.storage(alias), file_name=file_name)
Exemple #6
0
def __(alias: str) -> StorageClient:
    return storage_client_type(storages.storage(alias))
Exemple #7
0
def __(alias: str,
       file_name: str,
       compression: Compression = Compression.NONE):
    return write_file_command(storages.storage(alias),
                              file_name=file_name,
                              compression=compression)
Exemple #8
0
def __(alias: str, file_name: str, force: bool = True):
    return delete_file_command(storages.storage(alias),
                               file_name=file_name,
                               force=force)