Changeset View
Changeset View
Standalone View
Standalone View
swh/objstorage/factory.py
Show All 40 Lines | try: | ||||
_STORAGE_CLASSES["azure"] = AzureCloudObjStorage | _STORAGE_CLASSES["azure"] = AzureCloudObjStorage | ||||
_STORAGE_CLASSES["azure-prefixed"] = PrefixedAzureCloudObjStorage | _STORAGE_CLASSES["azure-prefixed"] = PrefixedAzureCloudObjStorage | ||||
except ImportError as e: | except ImportError as e: | ||||
_STORAGE_CLASSES_MISSING["azure"] = e.args[0] | _STORAGE_CLASSES_MISSING["azure"] = e.args[0] | ||||
_STORAGE_CLASSES_MISSING["azure-prefixed"] = e.args[0] | _STORAGE_CLASSES_MISSING["azure-prefixed"] = e.args[0] | ||||
try: | try: | ||||
from swh.objstorage.backends.rados import RADOSObjStorage | |||||
_STORAGE_CLASSES["rados"] = RADOSObjStorage | |||||
except ImportError as e: | |||||
_STORAGE_CLASSES_MISSING["rados"] = e.args[0] | |||||
try: | |||||
from swh.objstorage.backends.libcloud import ( | from swh.objstorage.backends.libcloud import ( | ||||
AwsCloudObjStorage, | AwsCloudObjStorage, | ||||
OpenStackCloudObjStorage, | OpenStackCloudObjStorage, | ||||
) | ) | ||||
_STORAGE_CLASSES["s3"] = AwsCloudObjStorage | _STORAGE_CLASSES["s3"] = AwsCloudObjStorage | ||||
_STORAGE_CLASSES["swift"] = OpenStackCloudObjStorage | _STORAGE_CLASSES["swift"] = OpenStackCloudObjStorage | ||||
except ImportError as e: | except ImportError as e: | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |