Skip to content

Commit 4f0d1b8

Browse files
author
paul.mcnally
committed
Undo changes to create datastore method as we're removing it from the sdk
1 parent a625dbf commit 4f0d1b8

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/eCloud/DatastoreClient.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,25 @@ class DatastoreClient extends Client implements ClientEntityInterface
1212
/**
1313
* Create a datastore
1414
* @param Datastore $datastore
15-
* @param null|string $iopsTier UUID of an IOPS tier to apply to the datastore
1615
* @return bool
1716
*/
18-
public function create(Datastore $datastore, $iopsTier = null)
17+
public function create(Datastore $datastore)
1918
{
20-
$data = [
19+
$data = json_encode(
20+
[
2121
'name' => $datastore->name,
2222
'solution_id' => $datastore->solutionId,
2323
'capacity' => $datastore->capacity
24-
];
24+
]
25+
);
2526

2627
if (!empty($datastore->siteId)) {
2728
$data['site_id'] = $datastore->siteId;
2829
}
2930

30-
if (!empty($iopsTier)) {
31-
$data['iops_tier'] = $iopsTier;
32-
}
33-
3431
$response = $this->post(
3532
'v1/datastores',
36-
json_encode($data)
33+
$data
3734
);
3835

3936
return $response->getStatusCode() == 202;

0 commit comments

Comments
 (0)