Cloud/Infrastructure/Adapter/Rackspace.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 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\Adapter














Rackspace servers adapter for infrastructure service
- Parent(s)
- \Zend_Cloud_Infrastructure_Adapter_AbstractAdapter
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
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 value
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)Details- Type
- array
Methods

__construct(array | \Zend_Config $options = array()) : voidConstructor
Parameters
| Name | Type | Description |
|---|---|---|
| $options | array | \Zend_Config |

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

createInstance(string $name, array $options) : \Instance | booleanCreate a new instance
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array |
| Type | Description |
|---|---|
| \Instance | boolean |

destroyInstance(string $id) : booleanDestroy an instance
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

getAdapter() : \Zend_Service_Rackspace_ServersGet the adapter
Returns
| Type | Description |
|---|---|
| \Zend_Service_Rackspace_Servers |

getLastHttpResponse() : \Zend_Http_ResponseGet the last HTTP response
Returns
| Type | Description |
|---|---|
| \Zend_Http_Response |

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

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

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

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

rebootInstance(string $id) : booleanReboot an instance
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

startInstance(string $id) : booleanStart an instance
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

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

stopInstance(string $id) : booleanStop an instance
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |