Cloud/Infrastructure/Adapter/Rackspace.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
-
New BSD License
- Package
- Zend_Cloud_Infrastructure
- Subpackage
- Adapter
\Zend_Cloud_Infrastructure_Adapter_Rackspace
Package: Zend\Cloud\Infrastructure\AdapterRackspace servers adapter for infrastructure service
- Parent(s)
- \Zend_Cloud_Infrastructure_Adapter_AbstractAdapter
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
-
New BSD License
Constants


RACKSPACE_KEY
= 'rackspace_key'


RACKSPACE_REGION
= 'rackspace_region'


RACKSPACE_ZONE_USA
= 'USA'
Properties



array $mapStatus = array('ACTIVE' => \Zend_Cloud_Infrastructure_Instance::STATUS_RUNNING, 'SUSPENDED' => \Zend_Cloud_Infrastructure_Instance::STATUS_STOPPED, 'BUILD' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'REBUILD' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'QUEUE_RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'PREP_RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'VERIFY_RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'PASSWORD' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'RESCUE' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'REBOOT' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBOOTING, 'HARD_REBOOT' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBOOTING, 'SHARE_IP' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'SHARE_IP_NO_CONFIG' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'DELETE_IP' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'UNKNOWN' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING)
Map array between Rackspace and Infrastructure status
Default valuearray('ACTIVE' => \Zend_Cloud_Infrastructure_Instance::STATUS_RUNNING, 'SUSPENDED' => \Zend_Cloud_Infrastructure_Instance::STATUS_STOPPED, 'BUILD' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'REBUILD' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'QUEUE_RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'PREP_RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'VERIFY_RESIZE' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBUILD, 'PASSWORD' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'RESCUE' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'REBOOT' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBOOTING, 'HARD_REBOOT' => \Zend_Cloud_Infrastructure_Instance::STATUS_REBOOTING, 'SHARE_IP' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'SHARE_IP_NO_CONFIG' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'DELETE_IP' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING, 'UNKNOWN' => \Zend_Cloud_Infrastructure_Instance::STATUS_PENDING)
Details
- Type
- array



array $validMetrics = array(\Zend_Cloud_Infrastructure_Instance::MONITOR_CPU, \Zend_Cloud_Infrastructure_Instance::MONITOR_RAM, \Zend_Cloud_Infrastructure_Instance::MONITOR_DISK, \Zend_Cloud_Infrastructure_Instance::MONITOR_DISK_READ, \Zend_Cloud_Infrastructure_Instance::MONITOR_DISK_WRITE, \Zend_Cloud_Infrastructure_Instance::MONITOR_NETWORK_IN, \Zend_Cloud_Infrastructure_Instance::MONITOR_NETWORK_OUT)
Default valuearray(\Zend_Cloud_Infrastructure_Instance::MONITOR_CPU, \Zend_Cloud_Infrastructure_Instance::MONITOR_RAM, \Zend_Cloud_Infrastructure_Instance::MONITOR_DISK, \Zend_Cloud_Infrastructure_Instance::MONITOR_DISK_READ, \Zend_Cloud_Infrastructure_Instance::MONITOR_DISK_WRITE, \Zend_Cloud_Infrastructure_Instance::MONITOR_NETWORK_IN, \Zend_Cloud_Infrastructure_Instance::MONITOR_NETWORK_OUT)
Details
- Type
- array
- Inherited_from
-
\Zend_Cloud_Infrastructure_Adapter_AbstractAdapter::$$validMetrics
Methods



convertAttributes(array $attr) : array | boolean
Convert the attributes of Rackspace server into attributes of Infrastructure
Parameters
Name |
Type |
Description |
$attr |
array |
|
Returns
Type |
Description |
array | boolean |
|



imagesInstance() : \ImageList | boolean
Return a list of all the available instance images
Returns
Type |
Description |
\ImageList | boolean |
|



listInstances() : \InstanceList | boolean
Return a list of the available instancies
Returns
Type |
Description |
\InstanceList | boolean |
|



monitorInstance(string $id, string $metric, null | array $options = null) : array | boolean
Return the system information about the $metric of an instance
NOTE: it works only for Linux servers
Parameters
Name |
Type |
Description |
$id |
string |
|
$metric |
string |
|
$options |
null | array |
|
Returns
Type |
Description |
array | boolean |
|



publicDnsInstance(string $id) : string | boolean
Return the public DNS name/Ip address of the instance
Parameters
Name |
Type |
Description |
$id |
string |
|
Returns
Type |
Description |
string | boolean |
|



statusInstance( $id) : string | boolean
Return the status of an instance
Parameters
Name |
Type |
Description |
$id |
|
string |
Returns
Type |
Description |
string | boolean |
|