|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace OpenStack\DataProcessing\v1\Models; |
|
4
|
|
|
|
|
5
|
|
|
use OpenStack\Common\Resource\Creatable; |
|
6
|
|
|
use OpenStack\Common\Resource\Deletable; |
|
7
|
|
|
use OpenStack\Common\Resource\Listable; |
|
8
|
|
|
use OpenStack\Common\Resource\OperatorResource; |
|
9
|
|
|
use OpenStack\Common\Resource\Retrievable; |
|
10
|
|
|
|
|
11
|
|
|
class ClusterTemplate extends OperatorResource implements Listable, Retrievable, Creatable, Deletable |
|
12
|
|
|
{ |
|
13
|
|
|
public $neutronManagementNetwork; |
|
14
|
|
|
public $description; |
|
15
|
|
|
public $shares; |
|
16
|
|
|
public $clusterConfigs; |
|
17
|
|
|
public $createdAt; |
|
18
|
|
|
public $defaultImageId; |
|
19
|
|
|
public $updatedAt; |
|
20
|
|
|
public $pluginName; |
|
21
|
|
|
public $domainName; |
|
22
|
|
|
public $isDefault; |
|
23
|
|
|
public $isProtected; |
|
24
|
|
|
public $useAutoconfig; |
|
25
|
|
|
public $antiAffinity; |
|
26
|
|
|
public $tenantId; |
|
27
|
|
|
public $nodeGroups; |
|
28
|
|
|
public $isPublic; |
|
29
|
|
|
public $hadoopVersion; |
|
30
|
|
|
public $id; |
|
31
|
|
|
public $name; |
|
32
|
|
|
|
|
33
|
|
|
protected $resourceKey = 'cluster_template'; |
|
34
|
|
|
protected $resourcesKey = 'cluster_templates'; |
|
35
|
|
|
|
|
36
|
|
|
protected $aliases = [ |
|
37
|
|
|
'neutron_management_network' => 'neutronManagementNetwork', |
|
38
|
|
|
'cluster_configs' => 'clusterConfigs', |
|
39
|
|
|
'created_at' => 'createdAt', |
|
40
|
|
|
'default_image_id' => 'defaultImageId', |
|
41
|
|
|
'updated_at' => 'updatedAt', |
|
42
|
|
|
'plugin_name' => 'pluginName', |
|
43
|
|
|
'domain_name' => 'domainName', |
|
44
|
|
|
'is_default' => 'isDefault', |
|
45
|
|
|
'is_protected' => 'isProtected', |
|
46
|
|
|
'use_autoconfig' => 'useAutoconfig', |
|
47
|
|
|
'anti_affinity' => 'antiAffinity', |
|
48
|
|
|
'tenant_id' => 'tenantId', |
|
49
|
|
|
'node_groups' => 'nodeGroups', |
|
50
|
|
|
'is_public' => 'isPublic', |
|
51
|
|
|
'hadoop_version' => 'hadoopVersion', |
|
52
|
|
|
]; |
|
53
|
|
|
|
|
54
|
|
|
public function retrieve() |
|
55
|
|
|
{ |
|
56
|
|
|
$response = $this->execute($this->api->getClusterTemplate(), $this->getAttrs(['id'])); |
|
|
|
|
|
|
57
|
|
|
$this->populateFromResponse($response); |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
public function create(array $userOptions): Creatable |
|
61
|
|
|
{ |
|
62
|
|
|
$response = $this->execute($this->api->postClusterTemplate(), $userOptions); |
|
|
|
|
|
|
63
|
|
|
|
|
64
|
|
|
return $this->populateFromResponse($response); |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
public function delete() |
|
68
|
|
|
{ |
|
69
|
|
|
$this->execute($this->api->deleteClusterTemplate(), $this->getAttrs(['id'])); |
|
|
|
|
|
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
public function update() |
|
73
|
|
|
{ |
|
74
|
|
|
$response = $this->execute($this->api->putClusterTemplate(), $this->getAttrs(['id', 'name', 'pluginName', 'hadoopVersion', 'neutronManagementNetwork', 'description', 'shares', 'clusterConfigs', 'defaultImage', 'pluginName', 'domainName', 'isProtected', 'useAutoconfig', 'antiAffinity', 'nodeGroups', 'isPublic'])); |
|
|
|
|
|
|
75
|
|
|
$this->populateFromResponse($response); |
|
76
|
|
|
} |
|
77
|
|
|
} |
|
78
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.