Zend Framework
1.12
|
Public Member Functions | |
listServers ($details=false) | |
Get the list of the servers If $details is true returns detail info. | |
getServer ($id) | |
Get the specified server. | |
createServer (array $data, $metadata=array(), $files=array()) | |
Create a new server. | |
changeServerName ($id, $name) | |
Change the server's name. | |
changeServerPassword ($id, $password) | |
Change the admin password of the server. | |
deleteServer ($id) | |
Delete a server. | |
getServerIp ($id) | |
Get the server's IPs (public and private) | |
getServerPublicIp ($id) | |
Get the Public IPs of a server. | |
getServerPrivateIp ($id) | |
Get the Private IPs of a server. | |
shareIpAddress ($id, $ip, $groupId, $configure=true) | |
Share an ip address for a server (id) | |
unshareIpAddress ($id, $ip) | |
Unshare IP address for a server ($id) | |
rebootServer ($id, $hard=false) | |
Reboot a server. | |
rebuildServer ($id, $imageId) | |
Rebuild a server. | |
resizeServer ($id, $flavorId) | |
Resize a server. | |
confirmResizeServer ($id) | |
Confirm resize of a server. | |
revertResizeServer ($id) | |
Revert resize of a server. | |
listFlavors ($details=false) | |
Get the list of the flavors. | |
getFlavor ($flavorId) | |
Get the detail of a flavor. | |
listImages ($details=false) | |
Get the list of the images. | |
getImage ($id) | |
Get detail about an image. | |
createImage ($serverId, $name) | |
Create an image for a serverId. | |
deleteImage ($id) | |
Delete an image. | |
getBackupSchedule ($id) | |
Get the backup schedule of a server. | |
changeBackupSchedule ($id, $weekly, $daily) | |
Change the backup schedule of a server. | |
disableBackupSchedule ($id) | |
Disable the backup schedule for a server. | |
listSharedIpGroups ($details=false) | |
Get the list of shared IP groups. | |
getSharedIpGroup ($id) | |
Get the shared IP group. | |
createSharedIpGroup ($name, $serverId) | |
Create a shared Ip group. | |
deleteSharedIpGroup ($id) | |
Delete a Shared Ip Group. | |
![]() | |
__construct ($user, $key, $authUrl=self::US_AUTH_URL) | |
Constructor. | |
getUser () | |
Get User account. | |
getKey () | |
Get user key. | |
getAuthUrl () | |
Get authentication URL. | |
getStorageUrl () | |
Get the storage URL. | |
getCdnUrl () | |
Get the CDN URL. | |
getManagementUrl () | |
Get the management server URL. | |
setUser ($user) | |
Set the user account. | |
setKey ($key) | |
Set the authentication key. | |
setAuthUrl ($url) | |
Set the Authentication URL. | |
setServiceNet ($useServiceNet=true) | |
Sets whether to use ServiceNet. | |
getServiceNet () | |
Get whether we're using ServiceNet. | |
getToken () | |
Get the authentication token. | |
getErrorMsg () | |
Get the error msg of the last HTTP call. | |
getErrorCode () | |
Get the error code of the last HTTP call. | |
getHttpClient () | |
get the HttpClient instance | |
isSuccessful () | |
Return true is the last call was successful. | |
authenticate () | |
Authentication. | |
Public Attributes | |
const | LIMIT_FILE_SIZE = 10240 |
const | LIMIT_NUM_FILE = 5 |
const | ERROR_SERVICE_UNAVAILABLE = 'The service is unavailable' |
const | ERROR_UNAUTHORIZED = 'Unauthorized' |
const | ERROR_OVERLIMIT = 'You reached the limit of requests, please wait some time before retry' |
const | ERROR_PARAM_NO_ID = 'You must specify the item\'s id' |
const | ERROR_PARAM_NO_NAME = 'You must specify the name' |
const | ERROR_PARAM_NO_SERVERID = 'You must specify the server Id' |
const | ERROR_PARAM_NO_IMAGEID = 'You must specify the server\'s image ID' |
const | ERROR_PARAM_NO_FLAVORID = 'You must specify the server\'s flavor ID' |
const | ERROR_PARAM_NO_ARRAY = 'You must specify an array of parameters' |
const | ERROR_PARAM_NO_WEEKLY = 'You must specify a weekly backup schedule' |
const | ERROR_PARAM_NO_DAILY = 'You must specify a daily backup schedule' |
const | ERROR_ITEM_NOT_FOUND = 'The item specified doesn\'t exist.' |
const | ERROR_NO_FILE_EXISTS = 'The file specified doesn\'t exist' |
const | ERROR_LIMIT_FILE_SIZE = 'You reached the size length of a file' |
const | ERROR_IN_PROGRESS = 'The item specified is still in progress' |
const | ERROR_BUILD_IN_PROGRESS = 'The build is still in progress' |
const | ERROR_RESIZE_NOT_ALLOWED = 'The resize is not allowed' |
![]() | |
const | VERSION = 'v1.0' |
const | US_AUTH_URL = 'https://auth.api.rackspacecloud.com' |
const | UK_AUTH_URL = 'https://lon.auth.api.rackspacecloud.com' |
const | API_FORMAT = 'json' |
const | USER_AGENT = 'Zend_Service_Rackspace' |
const | STORAGE_URL = "X-Storage-Url" |
const | AUTHTOKEN = "X-Auth-Token" |
const | AUTHUSER_HEADER = "X-Auth-User" |
const | AUTHKEY_HEADER = "X-Auth-Key" |
const | AUTHUSER_HEADER_LEGACY = "X-Storage-User" |
const | AUTHKEY_HEADER_LEGACY = "X-Storage-Pass" |
const | AUTHTOKEN_LEGACY = "X-Storage-Token" |
const | CDNM_URL = "X-CDN-Management-Url" |
const | MANAGEMENT_URL = "X-Server-Management-Url" |
Protected Member Functions | |
updateServer ($id, $name=null, $password=null) | |
Change the name or the admin password for a server. | |
![]() | |
httpCall ($url, $method, $headers=array(), $data=array(), $body=null) | |
HTTP call. | |
Additional Inherited Members | |
![]() | |
$key | |
$user | |
$token | |
$authUrl | |
$httpClient | |
$errorMsg | |
$errorCode | |
$storageUrl | |
$cdnUrl | |
$managementUrl | |
$useServiceNet = false | |
changeBackupSchedule | ( | $id, | |
$weekly, | |||
$daily | |||
) |
Change the backup schedule of a server.
string | $id | server's Id |
string | $weekly | |
string | $daily |
changeServerName | ( | $id, | |
$name | |||
) |
Change the server's name.
string | $id | |
string | $name |
changeServerPassword | ( | $id, | |
$password | |||
) |
Change the admin password of the server.
string | $id | |
string | $password |
confirmResizeServer | ( | $id | ) |
Confirm resize of a server.
During a resize operation, the original server is saved for a period of time to allow roll back if there is a problem. Once the newly resized server is tested and has been confirmed to be functioning properly, use this operation to confirm the resize. After confirmation, the original server is removed and cannot be rolled back to. All resizes are automatically confirmed after 24 hours if they are not explicitly confirmed or reverted.
string | $id |
createImage | ( | $serverId, | |
$name | |||
) |
Create an image for a serverId.
string | $serverId | |
string | $name |
createServer | ( | array | $data, |
$metadata = array() , |
|||
$files = array() |
|||
) |
Create a new server.
The required parameters are specified in $data (name, imageId, falvorId) The $files is an associative array with 'serverPath' => 'localPath'
array | $data | |
array | $metadata | |
array | $files |
createSharedIpGroup | ( | $name, | |
$serverId | |||
) |
Create a shared Ip group.
string | $name | |
string | $serverId |
deleteImage | ( | $id | ) |
Delete an image.
string | $id |
deleteServer | ( | $id | ) |
Delete a server.
string | $id |
deleteSharedIpGroup | ( | $id | ) |
Delete a Shared Ip Group.
integer | $id |
disableBackupSchedule | ( | $id | ) |
Disable the backup schedule for a server.
string | $id | server's Id |
getBackupSchedule | ( | $id | ) |
Get the backup schedule of a server.
string | $id | server's Id |
getFlavor | ( | $flavorId | ) |
Get the detail of a flavor.
string | $flavorId |
getImage | ( | $id | ) |
Get detail about an image.
string | $id |
getServer | ( | $id | ) |
getServerIp | ( | $id | ) |
Get the server's IPs (public and private)
string | $id |
getServerPrivateIp | ( | $id | ) |
Get the Private IPs of a server.
string | $id |
getServerPublicIp | ( | $id | ) |
Get the Public IPs of a server.
string | $id |
getSharedIpGroup | ( | $id | ) |
Get the shared IP group.
integer | $id |
listFlavors | ( | $details = false | ) |
Get the list of the flavors.
If $details is true returns detail info
boolean | $details |
listImages | ( | $details = false | ) |
Get the list of the images.
boolean | $details |
listServers | ( | $details = false | ) |
Get the list of the servers If $details is true returns detail info.
boolean | $details |
listSharedIpGroups | ( | $details = false | ) |
Get the list of shared IP groups.
boolean | $details |
rebootServer | ( | $id, | |
$hard = false |
|||
) |
Reboot a server.
$hard true is the equivalent of power cycling the server $hard false is a graceful shutdown
string | $id | |
boolean | $hard |
rebuildServer | ( | $id, | |
$imageId | |||
) |
Rebuild a server.
The rebuild function removes all data on the server and replaces it with the specified image, serverId and IP addresses will remain the same.
string | $id | |
string | $imageId |
resizeServer | ( | $id, | |
$flavorId | |||
) |
Resize a server.
The resize function converts an existing server to a different flavor, in essence, scaling the server up or down. The original server is saved for a period of time to allow rollback if there is a problem. All resizes should be tested and explicitly confirmed, at which time the original server is removed. All resizes are automatically confirmed after 24 hours if they are not explicitly confirmed or reverted.
string | $id | |
string | $flavorId |
revertResizeServer | ( | $id | ) |
Revert resize of a server.
During a resize operation, the original server is saved for a period of time to allow for roll back if there is a problem. If you determine there is a problem with a newly resized server, use this operation to revert the resize and roll back to the original server. All resizes are automatically confirmed after 24 hours if they have not already been confirmed explicitly or reverted.
string | $id |
shareIpAddress | ( | $id, | |
$ip, | |||
$groupId, | |||
$configure = true |
|||
) |
Share an ip address for a server (id)
string | $id | server |
string | $ip | |
string | $groupId |
unshareIpAddress | ( | $id, | |
$ip | |||
) |
Unshare IP address for a server ($id)
string | $id | |
string | $ip |
|
protected |
Change the name or the admin password for a server.
string | $id | |
string | $name | |
string | $password |
const ERROR_BUILD_IN_PROGRESS = 'The build is still in progress' |
const ERROR_IN_PROGRESS = 'The item specified is still in progress' |
const ERROR_ITEM_NOT_FOUND = 'The item specified doesn\'t exist.' |
const ERROR_LIMIT_FILE_SIZE = 'You reached the size length of a file' |
const ERROR_NO_FILE_EXISTS = 'The file specified doesn\'t exist' |
const ERROR_OVERLIMIT = 'You reached the limit of requests, please wait some time before retry' |
const ERROR_PARAM_NO_ARRAY = 'You must specify an array of parameters' |
const ERROR_PARAM_NO_DAILY = 'You must specify a daily backup schedule' |
const ERROR_PARAM_NO_FLAVORID = 'You must specify the server\'s flavor ID' |
const ERROR_PARAM_NO_ID = 'You must specify the item\'s id' |
const ERROR_PARAM_NO_IMAGEID = 'You must specify the server\'s image ID' |
const ERROR_PARAM_NO_NAME = 'You must specify the name' |
const ERROR_PARAM_NO_SERVERID = 'You must specify the server Id' |
const ERROR_PARAM_NO_WEEKLY = 'You must specify a weekly backup schedule' |
const ERROR_RESIZE_NOT_ALLOWED = 'The resize is not allowed' |
const ERROR_SERVICE_UNAVAILABLE = 'The service is unavailable' |
const ERROR_UNAUTHORIZED = 'Unauthorized' |
const LIMIT_FILE_SIZE = 10240 |
const LIMIT_NUM_FILE = 5 |