Skip to content

Commit

Permalink
adds test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mugdha273 committed Oct 17, 2023
1 parent 6f071d8 commit 856ff23
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
30 changes: 13 additions & 17 deletions src/Storage/Device/Ceph.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,42 @@

namespace Utopia\Storage\Device;

use Utopia\Storage\Storage;

class Ceph extends S3
{
/**
* Regions constants
*/
const US_EAST_1 = 'us-east-1';

const US_EAST_2 = 'us-east-2';

const US_WEST_1 = 'us-west-1';

const US_WEST_2 = 'us-west-2';

/**
* Ceph Constructor
*
* @param string $root
* @param string $accessKey
* @param string $secretKey
* @param string $bucket
* @param string $region
* @param string $acl
*/
public function __construct(string $root, string $accessKey, string $secretKey, string $bucket, string $region = self::US_WEST_001, string $acl = self::ACL_PRIVATE)
public function __construct(string $root, string $accessKey, string $secretKey, string $bucket, string $cephHost, string $region = self::US_WEST_001, string $acl = self::ACL_PRIVATE)
{
parent::__construct($root, $accessKey, $secretKey, $bucket, $region, $acl);
$this->headers['host'] = $bucket.'.'.'s3'.'.'.$region.'.ceph.io';
$this->headers['host'] = $cephHost;
}
/**
* @return string
*/

public function getName(): string
{
return 'Ceph Storage';
}

/**
* @return string
*/
public function getDescription(): string
{
return 'Ceph Storage';
}

public function getType(): string
{
return Storage::DEVICE_CEPH;
}
}
}
3 changes: 0 additions & 3 deletions src/Storage/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class Storage
* Add device by name
*
* @param string $name
* @param Device $device
* @return void
*
* @throws Exception
*/
Expand Down Expand Up @@ -85,7 +83,6 @@ public static function exists($name)
*
* Based on: https://stackoverflow.com/a/38659168/2299554
*
* @param int $bytes
* @param int $decimals
* @param string $system
* @return string
Expand Down

0 comments on commit 856ff23

Please sign in to comment.