@@ 16-42 (lines=27) @@ | ||
13 | * |
|
14 | * @property \OpenStack\Compute\v2\Api $api |
|
15 | */ |
|
16 | class Host extends OperatorResource implements Listable, Retrievable |
|
17 | { |
|
18 | /** @var string **/ |
|
19 | public $name; |
|
20 | ||
21 | /** @var string **/ |
|
22 | public $service; |
|
23 | ||
24 | /** @var string **/ |
|
25 | public $zone; |
|
26 | ||
27 | protected $resourceKey = 'host'; |
|
28 | protected $resourcesKey = 'hosts'; |
|
29 | ||
30 | protected $aliases = [ |
|
31 | 'host_name' => 'name' |
|
32 | ]; |
|
33 | ||
34 | /** |
|
35 | * {@inheritDoc} |
|
36 | */ |
|
37 | public function retrieve() |
|
38 | { |
|
39 | $response = $this->execute($this->api->getHost(), $this->getAttrs(['name'])); |
|
40 | $this->populateFromResponse($response); |
|
41 | } |
|
42 | } |
|
43 |
@@ 8-25 (lines=18) @@ | ||
5 | use OpenStack\Common\Resource\Listable; |
|
6 | use OpenStack\Common\Resource\OperatorResource; |
|
7 | ||
8 | class JobConfig extends OperatorResource implements Listable |
|
9 | { |
|
10 | public $id; //id of jobs |
|
11 | public $jobConfigs; |
|
12 | ||
13 | protected $resourceKey = 'job_execution'; |
|
14 | protected $resourcesKey = 'job_executions'; |
|
15 | ||
16 | protected $aliases = [ |
|
17 | 'job_configs' => 'jobConfigs', |
|
18 | ]; |
|
19 | ||
20 | public function retrieve() |
|
21 | { |
|
22 | $response = $this->execute($this->api->getJobConfig(), $this->getAttrs(['id'])); |
|
23 | $this->populateFromResponse($response); |
|
24 | } |
|
25 | } |
|
26 |