Cloud/Infrastructure/Instance.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  
Subpackage
Infrastructure  

\Zend_Cloud_Infrastructure_Instance

Package: Zend_Cloud\Infrastructure
Instance of an infrastructure service
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  STATUS_RUNNING = 'running'
>VConstant  STATUS_STOPPED = 'stopped'
>VConstant  STATUS_SHUTTING_DOWN = 'shutting-down'
>VConstant  STATUS_REBOOTING = 'rebooting'
>VConstant  STATUS_TERMINATED = 'terminated'
>VConstant  STATUS_PENDING = 'pending'
>VConstant  STATUS_REBUILD = 'rebuild'
>VConstant  INSTANCE_ID = 'id'
>VConstant  INSTANCE_IMAGEID = 'imageId'
>VConstant  INSTANCE_NAME = 'name'
>VConstant  INSTANCE_STATUS = 'status'
>VConstant  INSTANCE_PUBLICDNS = 'publicDns'
>VConstant  INSTANCE_CPU = 'cpu'
>VConstant  INSTANCE_RAM = 'ram'
>VConstant  INSTANCE_STORAGE = 'storageSize'
>VConstant  INSTANCE_ZONE = 'zone'
>VConstant  INSTANCE_LAUNCHTIME = 'launchTime'
>VConstant  MONITOR_CPU = 'CpuUsage'
>VConstant  MONITOR_RAM = 'RamUsage'
>VConstant  MONITOR_NETWORK_IN = 'NetworkIn'
>VConstant  MONITOR_NETWORK_OUT = 'NetworkOut'
>VConstant  MONITOR_DISK = 'DiskUsage'
>VConstant  MONITOR_DISK_WRITE = 'DiskWrite'
>VConstant  MONITOR_DISK_READ = 'DiskRead'
>VConstant  MONITOR_START_TIME = 'StartTime'
>VConstant  MONITOR_END_TIME = 'EndTime'
>VConstant  SSH_USERNAME = 'username'
>VConstant  SSH_PASSWORD = 'password'
>VConstant  SSH_PRIVATE_KEY = 'privateKey'
>VConstant  SSH_PUBLIC_KEY = 'publicKey'
>VConstant  SSH_PASSPHRASE = 'passphrase'

Properties

>VPropertyprotected\Zend_Cloud_Infrastructure_Adapter $adapter
>VPropertyprotectedarray $attributeRequired = array(self::INSTANCE_ID, self::INSTANCE_STATUS, self::INSTANCE_IMAGEID, self::INSTANCE_ZONE)
Attributes required for an instance
Default valuearray(self::INSTANCE_ID, self::INSTANCE_STATUS, self::INSTANCE_IMAGEID, self::INSTANCE_ZONE)Details
Type
array
>VPropertyprotectedarray $attributes
Instance's attribute
Details
Type
array

Methods

methodpublic__construct(\Adapter $adapter, array $data = null) : void

Constructor

Parameters
NameTypeDescription
$adapter\Adapter
$dataarray
methodpublicdeploy( $params, string | array $cmd) : string | array

Run arbitrary shell script on the instance

Parameters
NameTypeDescription
$params
$cmdstring | array
Returns
TypeDescription
string | array
methodpublicdestroy() : boolean

Destroy the instance

Returns
TypeDescription
boolean
methodpublicgetAttribute( $key) : \misc | false

Get Attribute with a specific key

Parameters
NameTypeDescription
$key
Returns
TypeDescription
\misc | false
methodpublicgetAttributes() : array

Get all the attributes

Returns
TypeDescription
array
methodpublicgetCpu() : string

Get the instance's CPU

Returns
TypeDescription
string
methodpublicgetId() : string

Get the instance's id

Returns
TypeDescription
string
methodpublicgetImageId() : string

Get the instance's image id

Returns
TypeDescription
string
methodpublicgetLaunchTime() : string

Get the instance's launch time

Returns
TypeDescription
string
methodpublicgetName() : string

Get the instance's name

Returns
TypeDescription
string
methodpublicgetPublicDns() : string

Get the public DNS of the instance

Returns
TypeDescription
string
methodpublicgetRamSize() : string

Get the instance's RAM size

Returns
TypeDescription
string
methodpublicgetStatus() : string | boolean

Get the status of the instance

Returns
TypeDescription
string | boolean
methodpublicgetStorageSize() : string

Get the instance's storage size

Returns
TypeDescription
string
methodpublicgetZone() : string

Get the instance's zone

Returns
TypeDescription
string
methodpublicmonitor(string $metric, null | array $options = null) : array | boolean

Return the system informations about the $metric of an instance

Parameters
NameTypeDescription
$metricstring
$optionsnull | array
Returns
TypeDescription
array | boolean
methodpublicreboot() : boolean

Reboot the instance

Returns
TypeDescription
boolean
methodpublicstart() : boolean

Start the instance

Returns
TypeDescription
boolean
methodpublicstop() : boolean

Stop the instance

Returns
TypeDescription
boolean
methodpublicwaitStatus(string $status, integer $timeout = \Adapter::TIMEOUT_STATUS_CHANGE) : boolean

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

Parameters
NameTypeDescription
$statusstring
$timeoutinteger
Returns
TypeDescription
boolean
Documentation was generated by phpDocumentor 2.2.0 .