Cloud/Infrastructure/Instance.php

Show: inherited
Table of Contents

Category
Zend  
Copyright
Copyright (c) 2005-2012 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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

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

Properties

Propertyprotected\Zend_Cloud_Infrastructure_Adapter $adapter =

Propertyprotectedarray $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
Propertyprotectedarray $attributes =

Instance's attribute

Details
Type
array

Methods

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

Constructor

Parameters
Name Type Description
$adapter \Adapter
$data array
methodpublicdeploy( $params, string | array $cmd) : string | array

Run arbitrary shell script on the instance

Parameters
Name Type Description
$params
$cmd string | array
Returns
Type Description
string | array
methodpublicdestroy() : boolean

Destroy the instance

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

Get Attribute with a specific key

Parameters
Name Type Description
$key
Returns
Type Description
\misc | false
methodpublicgetAttributes() : array

Get all the attributes

Returns
Type Description
array
methodpublicgetCpu() : string

Get the instance's CPU

Returns
Type Description
string
methodpublicgetId() : string

Get the instance's id

Returns
Type Description
string
methodpublicgetImageId() : string

Get the instance's image id

Returns
Type Description
string
methodpublicgetLaunchTime() : string

Get the instance's launch time

Returns
Type Description
string
methodpublicgetName() : string

Get the instance's name

Returns
Type Description
string
methodpublicgetPublicDns() : string

Get the public DNS of the instance

Returns
Type Description
string
methodpublicgetRamSize() : string

Get the instance's RAM size

Returns
Type Description
string
methodpublicgetStatus() : string | boolean

Get the status of the instance

Returns
Type Description
string | boolean
methodpublicgetStorageSize() : string

Get the instance's storage size

Returns
Type Description
string
methodpublicgetZone() : string

Get the instance's zone

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

Return the system informations about the $metric of an instance

Parameters
Name Type Description
$metric string
$options null | array
Returns
Type Description
array | boolean
methodpublicreboot() : boolean

Reboot the instance

Returns
Type Description
boolean
methodpublicstart() : boolean

Start the instance

Returns
Type Description
boolean
methodpublicstop() : boolean

Stop the instance

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

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

Parameters
Name Type Description
$status string
$timeout integer
Returns
Type Description
boolean
Documentation was generated by phpDocumentor 2.0.0a8.