Cloud/Infrastructure/Adapter/Rackspace.php

Show: PublicProtectedPrivateinherited
Table of Contents
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

>VConstant  RACKSPACE_USER = 'rackspace_user'
RACKSPACE constants
>VConstant  RACKSPACE_KEY = 'rackspace_key'
>VConstant  RACKSPACE_REGION = 'rackspace_region'
>VConstant  RACKSPACE_ZONE_USA = 'USA'
>VConstant  RACKSPACE_ZONE_UK = 'UK'
>VConstant  MONITOR_CPU_SAMPLES = 3

Properties

>VPropertyprotectedstring $accessKey
Rackspace access key
Details
Type
string
>VPropertyprotectedstring $accessUser
Rackspace access user
Details
Type
string
>VPropertyprotectedarray $flavors
Flavors
Details
Type
array
>VPropertyprotectedarray $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
>VPropertyprotected\Zend_Service_Rackspace_Servers $rackspace
Rackspace Servers Instance
>VPropertyprotectedstring $region
Rackspace Region
Details
Type
string

Methods

methodpublic__construct(array | \Zend_Config $options = array()) : void

Constructor

Parameters
NameTypeDescription
$optionsarray | \Zend_Config
methodprotectedconvertAttributes(array $attr) : array | boolean

Convert the attributes of Rackspace server into attributes of Infrastructure

Parameters
NameTypeDescription
$attrarray
Returns
TypeDescription
array | boolean
methodpubliccreateInstance(string $name, array $options) : \Instance | boolean

Create a new instance

Parameters
NameTypeDescription
$namestring
$optionsarray
Returns
TypeDescription
\Instance | boolean
methodpublicdestroyInstance(string $id) : boolean

Destroy an instance

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
boolean
methodpublicgetAdapter() : \Zend_Service_Rackspace_Servers

Get the adapter

Returns
TypeDescription
\Zend_Service_Rackspace_Servers
methodpublicgetLastHttpRequest() : string

Get last HTTP request

Returns
TypeDescription
string
methodpublicgetLastHttpResponse() : \Zend_Http_Response

Get the last HTTP response

Returns
TypeDescription
\Zend_Http_Response
methodpublicimagesInstance() : \ImageList | boolean

Return a list of all the available instance images

Returns
TypeDescription
\ImageList | boolean
methodpubliclistInstances() : \InstanceList | boolean

Return a list of the available instancies

Returns
TypeDescription
\InstanceList | boolean
methodpublicmonitorInstance(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
NameTypeDescription
$idstring
$metricstring
$optionsnull | array
Returns
TypeDescription
array | boolean
methodpublicpublicDnsInstance(string $id) : string | boolean

Return the public DNS name/Ip address of the instance

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
string | boolean
methodpublicrebootInstance(string $id) : boolean

Reboot an instance

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
boolean
methodpublicstartInstance(string $id) : boolean

Start an instance

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
boolean
methodpublicstatusInstance( $id) : string | boolean

Return the status of an instance

Parameters
NameTypeDescription
$id
Returns
TypeDescription
string | boolean
methodpublicstopInstance(string $id) : boolean

Stop an instance

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
boolean
methodpubliczonesInstance() : array

Return all the available zones

Returns
TypeDescription
array
Documentation was generated by phpDocumentor 2.2.0 .