Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/eCloud/Entities/Instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* @property boolean $online
* @property boolean $agentRunning
* @property boolean $backupEnabled
* @property boolean $backupVmEnabled
* @property boolean $backupAgentEnabled
* @property boolean $isEncrypted
* @property string $hostGroupId
* @property string $volumeGroupId
Expand All @@ -30,4 +32,31 @@
class Instance extends Entity
{
protected $dates = ['createdAt', 'updatedAt'];

public static $entityMap = [
'id' => 'id',
'name' => 'name',
'vpc_id' => 'vpcId',
'availability_zone_id' => 'availabilityZoneId',
'image_id' => 'imageId',
'platform' => 'platform',
'vcpu_cores' => 'vcpuCores',
'vcpu_sockets' => 'vcpuSockets',
'vcpu_cores_per_socket' => 'vcpuCoresPerSocket',
'ram_capacity' => 'ramCapacity',
'volume_capacity' => 'volumeCapacity',
'locked' => 'locked',
'status' => 'status',
'online' => 'online',
'agent_running' => 'agentRunning',
'backup_enabled' => 'backupEnabled',
'backup_vm_enabled' => 'backupVmEnabled',
'backup_agent_enabled' => 'backupAgentEnabled',
'backup_gateway_id' => 'backupGatewayId',
'is_encrypted' => 'isEncrypted',
'host_group_id' => 'hostGroupId',
'volume_group_id' => 'volumeGroupId',
'created_at' => 'createdAt',
'updated_at' => 'updatedAt',
];
}
25 changes: 1 addition & 24 deletions src/eCloud/InstanceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,7 @@ class InstanceClient extends Client implements ClientEntityInterface

public function getEntityMap()
{
return [
'id' => 'id',
'name' => 'name',
'vpc_id' => 'vpcId',
'availability_zone_id' => 'availabilityZoneId',
'image_id' => 'imageId',
'platform' => 'platform',
'vcpu_cores' => 'vcpuCores',
'vcpu_sockets' => 'vcpuSockets',
'vcpu_cores_per_socket' => 'vcpuCoresPerSocket',
'ram_capacity' => 'ramCapacity',
'volume_capacity' => 'volumeCapacity',
'locked' => 'locked',
'status' => 'status',
'online' => 'online',
'agent_running' => 'agentRunning',
'backup_enabled' => 'backupEnabled',
'backup_gateway_id' => 'backupGatewayId',
'is_encrypted' => 'isEncrypted',
'host_group_id' => 'hostGroupId',
'volume_group_id' => 'volumeGroupId',
'created_at' => 'createdAt',
'updated_at' => 'updatedAt',
];
return Instance::$entityMap;
}

public function loadEntity($data)
Expand Down