Cloud/Infrastructure/Adapter/AbstractAdapter.php

Show: inherited
Table of Contents

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

Package: Zend\Cloud\Infrastructure\Adapter

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

Constant  HTTP_ADAPTER = 'http_adapter'
Constant  TIMEOUT_STATUS_CHANGE = 30

amount of time, in seconds, to wait for a status change

Inherited_from
\Zend_Cloud_Infrastructure_Adapter::TIMEOUT_STATUS_CHANGE  
Constant  TIME_STEP_STATUS_CHANGE = 5
inherited

The time step, in seconds, for the status change

Inherited from: \Zend_Cloud_Infrastructure_Adapter::TIME_STEP_STATUS_CHANGE

Properties

Propertyprotectedarray $adapterResult =

Store the last response from the adpter

Details
Type
array
Propertyprotectedarray $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

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

Methods

methodpubliccreateInstance(string $name, array $options) : boolean
inherited

Create a new instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::createInstance()
Parameters
Name Type Description
$name string
$options array
Returns
Type Description
boolean
methodpublicdeployInstance(string $id,  $params, string | array $cmd) : string | array

Run arbitrary shell script on an instance

Parameters
Name Type Description
$id string
$params
$cmd string | array
Returns
Type Description
string | array
methodpublicdestroyInstance(string $id) : boolean
inherited

Destroy an instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::destroyInstance()
Parameters
Name Type Description
$id string
Returns
Type Description
boolean
methodpublicgetAdapter() : object
inherited

Get the adapter instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::getAdapter()
Returns
Type Description
object
methodpublicgetAdapterResult() : array

Get the last result of the adapter

Returns
Type Description
array
methodpublicgetLastHttpRequest() : string
inherited

Get the last HTTP request

Inherited from: \Zend_Cloud_Infrastructure_Adapter::getLastHttpRequest()
Returns
Type Description
string
methodpublicgetLastHttpResponse() : \Zend_Http_Response
inherited

Get the last HTTP response

Inherited from: \Zend_Cloud_Infrastructure_Adapter::getLastHttpResponse()
Returns
Type Description
\Zend_Http_Response
methodpublicimagesInstance() : \ImageList
inherited

Return all the available instances images

Inherited from: \Zend_Cloud_Infrastructure_Adapter::imagesInstance()
Returns
Type Description
\ImageList
methodpubliclistInstances() : \InstanceList
inherited

Return a list of the available instances

Inherited from: \Zend_Cloud_Infrastructure_Adapter::listInstances()
Returns
Type Description
\InstanceList
methodpublicmonitorInstance(string $id, string $metric, array $options = null) : array
inherited

Return the system informations about the $metric of an instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::monitorInstance()
Parameters
Name Type Description
$id string
$metric string
$options array
Returns
Type Description
array
methodpublicpublicDnsInstance(string $id) : string | boolean
inherited

Return the public DNS name of the instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::publicDnsInstance()
Parameters
Name Type Description
$id string
Returns
Type Description
string | boolean
methodpublicrebootInstance(string $id) : boolean
inherited

Reboot an instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::rebootInstance()
Parameters
Name Type Description
$id string
Returns
Type Description
boolean
methodpublicstartInstance(string $id) : boolean
inherited

Start the execution of an instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::startInstance()
Parameters
Name Type Description
$id string
Returns
Type Description
boolean
methodpublicstatusInstance(string $id) : string
inherited

Return the status of an instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::statusInstance()
Parameters
Name Type Description
$id string
Returns
Type Description
string
methodpublicstopInstance(string $id) : boolean
inherited

Stop the execution of an instance

Inherited from: \Zend_Cloud_Infrastructure_Adapter::stopInstance()
Parameters
Name Type Description
$id string
Returns
Type Description
boolean
methodpublicwaitStatusInstance(string $id, string $status, integer $timeout = self::TIMEOUT_STATUS_CHANGE) : boolean

Wait for status $status with a timeout of $timeout seconds

Parameters
Name Type Description
$id string
$status string
$timeout integer
Returns
Type Description
boolean
methodpubliczonesInstance() : array
inherited

Return all the available zones

Inherited from: \Zend_Cloud_Infrastructure_Adapter::zonesInstance()
Returns
Type Description
array
Documentation was generated by phpDocumentor 2.0.0a8.