Merge in RR/pyinfra from config_refactoring to master
Squashed commit of the following:
commit 22636e5e5df1148004598a268348673537454e36
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Fri Feb 25 14:57:57 2022 +0100
applied black
commit 5d244c3f67fb9d6bd7cb78cbe92fc8035b6cf9b7
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Fri Feb 25 14:56:22 2022 +0100
restructured config and made correspondig changes in referencing code
commit 4dc64124e16e0f490e6785324b88751ee32dc49c
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Fri Feb 25 13:12:41 2022 +0100
test config restructuring
commit b0bd9aebdf58f3f4f43a1d4cdaf451bd6036d135
Author: Matthias Bisping <matthias.bisping@iqser.com>
Date: Fri Feb 25 13:10:35 2022 +0100
factored out test section of config
14 lines
475 B
Python
14 lines
475 B
Python
from pyinfra.storage.adapters.azure import AzureStorageAdapter
|
|
from pyinfra.storage.adapters.s3 import S3StorageAdapter
|
|
from pyinfra.storage.clients.azure import get_azure_client
|
|
from pyinfra.storage.clients.s3 import get_s3_client
|
|
from pyinfra.storage.storage import Storage
|
|
|
|
|
|
def get_azure_storage(config=None):
|
|
return Storage(AzureStorageAdapter(get_azure_client(config)))
|
|
|
|
|
|
def get_s3_storage(config=None):
|
|
return Storage(S3StorageAdapter(get_s3_client(config)))
|