-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathHypervisor.php
More file actions
105 lines (79 loc) · 2.26 KB
/
Copy pathHypervisor.php
File metadata and controls
105 lines (79 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
declare(strict_types=1);
namespace OpenStack\Compute\v2\Models;
use OpenStack\Common\Resource\Listable;
use OpenStack\Common\Resource\Retrievable;
use OpenStack\Common\Resource\OperatorResource;
/**
* @property \OpenStack\Compute\v2\Api $api
*/
class Hypervisor extends OperatorResource implements Retrievable, Listable
{
/** @var int */
public $id;
/** @var string */
public $status;
/** @var string */
public $state;
/** @var string */
public $hostIp;
/** @var int */
public $freeDiskGb;
/** @var int */
public $freeRamMb;
/** @var string */
public $hypervisorHostname;
/** @var string */
public $hypervisorType;
/** @var string */
public $hypervisorVersion;
/** @var int */
public $localGb;
/** @var int */
public $localGbUsed;
/** @var int */
public $memoryMb;
/** @var int */
public $memoryMbUsed;
/** @var int */
public $runningVms;
/** @var int */
public $vcpus;
/** @var int */
public $vcpusUsed;
/** @var array */
public $cpuInfo;
/** @var int */
public $currentWorkload;
/** @var int */
public $diskAvailableLeast;
/** @var array */
public $service;
protected $resourceKey = 'hypervisor';
protected $resourcesKey = 'hypervisors';
protected $aliases = [
'host_ip' => 'hostIp',
'free_disk_gb' => 'freeDiskGb',
'free_ram_mb' => 'freeRamMb',
'hypervisor_hostname' => 'hypervisorHostname',
'hypervisor_type' => 'hypervisorType',
'hypervisor_version' => 'hypervisorVersion',
'local_gb' => 'localGb',
'local_gb_used' => 'localGbUsed',
'memory_mb' => 'memoryMb',
'memory_mb_used' => 'memoryMbUsed',
'running_vms' => 'runningVms',
'vcpus_used' => 'vcpusUsed',
'cpu_info' => 'cpuInfo',
'current_workload' => 'currentWorkload',
'disk_available_least' => 'diskAvailableLeast',
];
/**
* {@inheritdoc}
*/
public function retrieve()
{
$response = $this->execute($this->api->getHypervisor(), ['id' => (string) $this->id]);
$this->populateFromResponse($response);
}
}