package | Zend_Service |
---|---|
inherited_from | \Zend_Service_Rackspace_Abstract |
__construct(string $user, string $key, string $authUrl = self::US_AUTH_URL
)
You must pass the account and the Rackspace authentication key. Optional: the authentication url (default is US)
string
string
string
authenticate() : boolean
boolean
changeBackupSchedule(string $id, string $weekly, string $daily) : boolean
string
server's Id
string
string
boolean
changeServerName(string $id, string $name) : boolean
string
string
boolean
changeServerPassword(string $id, string $password) : boolean
string
string
boolean
confirmResizeServer(string $id) : boolean
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
boolean
createImage(string $serverId, string $name) : \Zend_Service_Rackspace_Servers_Image
string
string
\Zend_Service_Rackspace_Servers_Image
createServer(array $data, array $metadata= array()
, array $files= array()
) : \Zend_Service_Rackspace_Servers_Server | boolean
The required parameters are specified in $data (name, imageId, falvorId) The $files is an associative array with 'serverPath' => 'localPath'
array
array
array
\Zend_Service_Rackspace_Servers_Server
boolean
createSharedIpGroup(string $name, string $serverId) : array | boolean
string
string
array
boolean
deleteImage(string $id) : boolean
string
boolean
deleteServer(string $id) : boolean
string
boolean
deleteSharedIpGroup(integer $id) : boolean
integer
boolean
disableBackupSchedule(string $id) : boolean
string
server's Id
boolean
getAuthUrl() : string
string
getBackupSchedule(string $id) : array | boolean
string
server's Id
array
boolean
getCdnUrl() : string | boolean
string
boolean
getErrorCode() : \strig
\strig
getErrorMsg() : string
string
getFlavor(string $flavorId) : array | boolean
string
array
boolean
getHttpClient() : \Zend_Http_Client
\Zend_Http_Client
getImage(string $id) : \Zend_Service_Rackspace_Servers_Image | boolean
string
\Zend_Service_Rackspace_Servers_Image
boolean
getKey() : string
string
getManagementUrl() : string | boolean
string
boolean
getServer(string $id) : \Zend_Service_Rackspace_Servers_Server
string
\Zend_Service_Rackspace_Servers_Server
getServerIp(string $id) : array | boolean
string
array
boolean
getServerPrivateIp(string $id) : array | boolean
string
array
boolean
getServerPublicIp(string $id) : array | boolean
string
array
boolean
getServiceNet() : boolean
boolean
getSharedIpGroup(integer $id) : \Zend_Service_Rackspace_Servers_SharedIpGroup | boolean
integer
\Zend_Service_Rackspace_Servers_SharedIpGroup
boolean
getStorageUrl() : string | boolean
string
boolean
getToken() : string
string
getUser() : string
string
isSuccessful() : boolean
boolean
listFlavors(boolean $details = false
) : array | boolean
If $details is true returns detail info
boolean
array
boolean
listImages(boolean $details = false
) : \Zend_Service_Rackspace_Servers_ImageList | boolean
boolean
\Zend_Service_Rackspace_Servers_ImageList
boolean
listServers(boolean $details = false
) : \Zend_Service_Rackspace_Servers_ServerList | boolean
boolean
\Zend_Service_Rackspace_Servers_ServerList
boolean
listSharedIpGroups(boolean $details = false
) : \Zend_Service_Rackspace_Servers_SharedIpGroupList | boolean
boolean
\Zend_Service_Rackspace_Servers_SharedIpGroupList
boolean
rebootServer(string $id, boolean $hard = false
) : boolean
$hard true is the equivalent of power cycling the server $hard false is a graceful shutdown
string
boolean
boolean
rebuildServer(string $id, string $imageId) : boolean
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
string
boolean
resizeServer(string $id, string $flavorId) : boolean
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
string
boolean
revertResizeServer(string $id) : boolean
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
boolean
setAuthUrl(string $url) : void
string
setKey(string $key) : void
string
setServiceNet(boolean $useServiceNet = true
)
ServiceNet is Rackspace's internal network. Bandwidth on ServiceNet is not charged.
boolean
setUser(string $user) : void
string
shareIpAddress(string $id, string $ip, string $groupId, $configure = true
) : boolean
string
server
string
string
boolean
unshareIpAddress(string $id, string $ip) : boolean
string
string
boolean
httpCall(string $url, string $method, array $headers= array()
, $data= array()
, string $body= null
) : \Zend_Http_Response
string
string
array
string
\Zend_Http_Response
updateServer(string $id, string $name= null
, string $password= null
) : boolean
string
string
string
boolean
$authUrl : string
$cdnUrl : string
$errorCode : string
$errorMsg : string
$httpClient : \Zend_Http_Client
$key : string
$managementUrl : string
$storageUrl : string
$token : string
$useServiceNet : boolean
false
$user : string
API_FORMAT = 'json'
AUTHKEY_HEADER = "X-Auth-Key"
AUTHKEY_HEADER_LEGACY = "X-Storage-Pass"
AUTHTOKEN = "X-Auth-Token"
AUTHTOKEN_LEGACY = "X-Storage-Token"
AUTHUSER_HEADER = "X-Auth-User"
AUTHUSER_HEADER_LEGACY = "X-Storage-User"
CDNM_URL = "X-CDN-Management-Url"
ERROR_BUILD_IN_PROGRESS = 'The build is still in progress'
ERROR_IN_PROGRESS = 'The item specified is still in progress'
ERROR_ITEM_NOT_FOUND = 'The item specified doesn\'t exist.'
ERROR_LIMIT_FILE_SIZE = 'You reached the size length of a file'
ERROR_NO_FILE_EXISTS = 'The file specified doesn\'t exist'
ERROR_OVERLIMIT = 'You reached the limit of requests, please wait some time before retry'
ERROR_PARAM_NO_ARRAY = 'You must specify an array of parameters'
ERROR_PARAM_NO_DAILY = 'You must specify a daily backup schedule'
ERROR_PARAM_NO_FLAVORID = 'You must specify the server\'s flavor ID'
ERROR_PARAM_NO_ID = 'You must specify the item\'s id'
ERROR_PARAM_NO_IMAGEID = 'You must specify the server\'s image ID'
ERROR_PARAM_NO_NAME = 'You must specify the name'
ERROR_PARAM_NO_SERVERID = 'You must specify the server Id'
ERROR_PARAM_NO_WEEKLY = 'You must specify a weekly backup schedule'
ERROR_RESIZE_NOT_ALLOWED = 'The resize is not allowed'
ERROR_SERVICE_UNAVAILABLE = 'The service is unavailable'
ERROR_UNAUTHORIZED = 'Unauthorized'
LIMIT_FILE_SIZE = 10240
LIMIT_NUM_FILE = 5
MANAGEMENT_URL = "X-Server-Management-Url"
STORAGE_URL = "X-Storage-Url"
UK_AUTH_URL = 'https://lon.auth.api.rackspacecloud.com'
USER_AGENT = 'Zend_Service_Rackspace'
US_AUTH_URL = 'https://auth.api.rackspacecloud.com'
VERSION = 'v1.0'