diff --git a/docker-compose.yml b/docker-compose.yml index 4cd5e9f7..764563c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,4 +20,6 @@ services: - BACKBLAZE_ACCESS_KEY - BACKBLAZE_SECRET - WASABI_ACCESS_KEY - - WASABI_SECRET \ No newline at end of file + - WASABI_SECRET + - CEPH_ACCESS_KEY + - CEPH_SECRET \ No newline at end of file diff --git a/src/Storage/Device/IBMCloudObject.php b/src/Storage/Device/IBMCloudObject.php new file mode 100644 index 00000000..ae365afa --- /dev/null +++ b/src/Storage/Device/IBMCloudObject.php @@ -0,0 +1,58 @@ +headers['host'] = $bucket.'.'.$region.'.'.'cloud.ibm.com'; + } + + /** + * @return string + */ + public function getName(): string + { + return 'IBM Cloud Object Storage'; + } + + /** + * @return string + */ + public function getDescription(): string + { + return 'IBM Cloud Object Storage'; + } + + /** + * @return string + */ + public function getType(): string + { + return Storage::DEVICE_IBM_CLOUD_OBJECT; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.php b/src/Storage/Storage.php index cabd18c8..2bcdff90 100644 --- a/src/Storage/Storage.php +++ b/src/Storage/Storage.php @@ -21,6 +21,8 @@ class Storage const DEVICE_LINODE = 'linode'; + const DEVICE_IBM_CLOUD_OBJECT = 'IBM Cloud Object Storage'; + /** * Devices. * diff --git a/tests/Storage/Device/IBMCloudObjectTest.php b/tests/Storage/Device/IBMCloudObjectTest.php new file mode 100644 index 00000000..36bd4a62 --- /dev/null +++ b/tests/Storage/Device/IBMCloudObjectTest.php @@ -0,0 +1,34 @@ +root = '/root'; + $key = $_SERVER['CEPH_ACCESS_KEY'] ?? ''; + $secret = $_SERVER['CEPH_SECRET'] ?? ''; + $bucket = 'storage-test'; + + $this->object = new IBMCloudObject($this->root, $key, $secret, $bucket, IBMCloudObject::AP_SOUTH_1, IBMCloudObject::ACL_PRIVATE); + } + + protected function getAdapterName(): string + { + return 'IBM Cloud Object Storage'; + } + + protected function getAdapterType(): string + { + return $this->object->getType(); + } + + protected function getAdapterDescription(): string + { + return 'IBM Cloud Object Storage'; + } +}