File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -12,28 +12,25 @@ class DatastoreClient extends Client implements ClientEntityInterface
12
12
/**
13
13
* Create a datastore
14
14
* @param Datastore $datastore
15
- * @param null|string $iopsTier UUID of an IOPS tier to apply to the datastore
16
15
* @return bool
17
16
*/
18
- public function create (Datastore $ datastore, $ iopsTier = null )
17
+ public function create (Datastore $ datastore )
19
18
{
20
- $ data = [
19
+ $ data = json_encode (
20
+ [
21
21
'name ' => $ datastore ->name ,
22
22
'solution_id ' => $ datastore ->solutionId ,
23
23
'capacity ' => $ datastore ->capacity
24
- ];
24
+ ]
25
+ );
25
26
26
27
if (!empty ($ datastore ->siteId )) {
27
28
$ data ['site_id ' ] = $ datastore ->siteId ;
28
29
}
29
30
30
- if (!empty ($ iopsTier )) {
31
- $ data ['iops_tier ' ] = $ iopsTier ;
32
- }
33
-
34
31
$ response = $ this ->post (
35
32
'v1/datastores ' ,
36
- json_encode ( $ data)
33
+ $ data
37
34
);
38
35
39
36
return $ response ->getStatusCode () == 202 ;
You can’t perform that action at this time.
0 commit comments