File tree 2 files changed +4
-6
lines changed 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -38,25 +38,24 @@ public function createCluster(array $options = []): Cluster
38
38
return $ this ->model (Cluster::class)->create ($ options );
39
39
}
40
40
41
- public function createMultipleClusters (array $ options = [])
41
+ public function createMultipleClusters (array $ options = [])
42
42
{
43
43
if (!array_key_exists ("count " , $ options )) {
44
- throw new \RuntimeException ("Require 'count' " );
44
+ throw new \RuntimeException ("Require 'count' " );
45
45
}
46
46
47
47
$ response = $ this ->execute ($ this ->api ->postClusters (), $ options );
48
48
# For multiple clusters, the current API returns only cluster IDs.
49
49
$ ids = Utils::flattenJson (Utils::jsonDecode ($ response ), 'clusters ' );
50
50
if ($ response ->getStatusCode () === 204 || empty ($ ids )) {
51
51
return ;
52
- }
52
+ }
53
53
foreach ($ ids as $ id ) {
54
54
$ cluster = $ this ->model (Cluster::class);
55
55
$ cluster ->id = $ id ;
56
56
yield $ cluster ;
57
57
}
58
-
59
- }
58
+ }
60
59
61
60
public function scaleCluster (array $ options = []): Cluster
62
61
{
Original file line number Diff line number Diff line change @@ -209,5 +209,4 @@ public function dataProcessingV1(array $options = []): \OpenStack\DataProcessing
209
209
$ defaults = ['catalogName ' => 'sahara ' , 'catalogType ' => 'data-processing ' ];
210
210
return $ this ->builder ->createService ('DataProcessing \\v1 ' , array_merge ($ defaults , $ options ));
211
211
}
212
-
213
212
}
You can’t perform that action at this time.
0 commit comments