Cloud/Infrastructure/Instance.php
- 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\InfrastructureInstance of an infrastructure service
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
-
New BSD License
Constants


STATUS_RUNNING
= 'running'


STATUS_STOPPED
= 'stopped'


STATUS_SHUTTING_DOWN
= 'shutting-down'


STATUS_REBOOTING
= 'rebooting'


STATUS_TERMINATED
= 'terminated'


STATUS_PENDING
= 'pending'


STATUS_REBUILD
= 'rebuild'


INSTANCE_IMAGEID
= 'imageId'


INSTANCE_STATUS
= 'status'


INSTANCE_PUBLICDNS
= 'publicDns'


INSTANCE_STORAGE
= 'storageSize'


INSTANCE_LAUNCHTIME
= 'launchTime'


MONITOR_NETWORK_IN
= 'NetworkIn'


MONITOR_NETWORK_OUT
= 'NetworkOut'


MONITOR_DISK
= 'DiskUsage'


MONITOR_DISK_WRITE
= 'DiskWrite'


MONITOR_DISK_READ
= 'DiskRead'


MONITOR_START_TIME
= 'StartTime'


MONITOR_END_TIME
= 'EndTime'


SSH_USERNAME
= 'username'


SSH_PASSWORD
= 'password'


SSH_PRIVATE_KEY
= 'privateKey'


SSH_PUBLIC_KEY
= 'publicKey'


SSH_PASSPHRASE
= 'passphrase'
Properties



array $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
Methods



deploy( $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 |
|



getAttribute( $key) : \misc | false
Get Attribute with a specific key
Parameters
Name |
Type |
Description |
$key |
|
|
Returns
Type |
Description |
\misc | false |
|



getStatus() : string | boolean
Get the status of the instance
Returns
Type |
Description |
string | boolean |
|



monitor(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 |
|



waitStatus(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