Cloud/Infrastructure/Adapter/AbstractAdapter.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cloud
- Subpackage
- DocumentService
\Zend_Cloud_Infrastructure_Adapter_AbstractAdapter
Abstract infrastructure service adapter
- Implements
- \Zend_Cloud_Infrastructure_Adapter
- Children
- \Zend_Cloud_Infrastructure_Adapter_Rackspace
- \Zend_Cloud_Infrastructure_Adapter_Ec2
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
HTTP_ADAPTER
= 'http_adapter'- Inherited_from
- \Zend_Cloud_Infrastructure_Adapter::HTTP_ADAPTER
TIMEOUT_STATUS_CHANGE
= 30
amount of time, in seconds, to wait for a status change
- Inherited_from
- \Zend_Cloud_Infrastructure_Adapter::TIMEOUT_STATUS_CHANGE
TIME_STEP_STATUS_CHANGE
= 5The time step, in seconds, for the status change
Inherited from: \Zend_Cloud_Infrastructure_Adapter::TIME_STEP_STATUS_CHANGE- Inherited_from
- \Zend_Cloud_Infrastructure_Adapter::TIME_STEP_STATUS_CHANGE
Properties

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)Valid metrics for monitor
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)Details- Type
- array
Methods

createInstance(string $name, array $options) : boolean
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array |
| Type | Description |
|---|---|
| boolean |

deployInstance(string $id, $params, string | array $cmd) : string | arrayRun arbitrary shell script on an instance
| Name | Type | Description |
|---|---|---|
| $id | string | |
| $params | ||
| $cmd | string | array |
| Type | Description |
|---|---|
| string | array |

destroyInstance(string $id) : boolean
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

getLastHttpRequest() : stringGet the last HTTP request
Inherited from: \Zend_Cloud_Infrastructure_Adapter::getLastHttpRequest()| Type | Description |
|---|---|
| string |

getLastHttpResponse() : \Zend_Http_ResponseGet the last HTTP response
Inherited from: \Zend_Cloud_Infrastructure_Adapter::getLastHttpResponse()| Type | Description |
|---|---|
| \Zend_Http_Response |

imagesInstance() : \ImageListReturn all the available instances images
Inherited from: \Zend_Cloud_Infrastructure_Adapter::imagesInstance()| Type | Description |
|---|---|
| \ImageList |

listInstances() : \InstanceListReturn a list of the available instances
Inherited from: \Zend_Cloud_Infrastructure_Adapter::listInstances()| Type | Description |
|---|---|
| \InstanceList |

monitorInstance(string $id, string $metric, array $options = null) : arrayReturn the system informations about the $metric of an instance
Inherited from: \Zend_Cloud_Infrastructure_Adapter::monitorInstance()| Name | Type | Description |
|---|---|---|
| $id | string | |
| $metric | string | |
| $options | array |
| Type | Description |
|---|---|
| array |

publicDnsInstance(string $id) : string | booleanReturn the public DNS name of the instance
Inherited from: \Zend_Cloud_Infrastructure_Adapter::publicDnsInstance()| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| string | boolean |

rebootInstance(string $id) : boolean
| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

startInstance(string $id) : booleanStart the execution of an instance
Inherited from: \Zend_Cloud_Infrastructure_Adapter::startInstance()| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

statusInstance(string $id) : stringReturn the status of an instance
Inherited from: \Zend_Cloud_Infrastructure_Adapter::statusInstance()| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| string |

stopInstance(string $id) : booleanStop the execution of an instance
Inherited from: \Zend_Cloud_Infrastructure_Adapter::stopInstance()| Name | Type | Description |
|---|---|---|
| $id | string |
| Type | Description |
|---|---|
| boolean |

waitStatusInstance(string $id, string $status, integer $timeout = self::TIMEOUT_STATUS_CHANGE) : booleanWait for status $status with a timeout of $timeout seconds
| Name | Type | Description |
|---|---|---|
| $id | string | |
| $status | string | |
| $timeout | integer |
| Type | Description |
|---|---|
| boolean |

zonesInstance() : arrayReturn all the available zones
Inherited from: \Zend_Cloud_Infrastructure_Adapter::zonesInstance()| Type | Description |
|---|---|
| array |