The Server class represents a single server node. A Server is always associated with a (Compute) Service. This implementation
supports extension attributes OS-DCF:diskConfig, RAX-SERVER:bandwidth,
rax-bandwidth:bandwith
adds a "personality" file to be uploaded during Create() or Rebuild() The `$path` argument specifies where the file will be stored on the
target server; the `$data` is the actual data values to be stored.
To upload a local file, use `file_get_contents('name')` for the `$data`
value.
Retrieves the metadata associated with a Server If a metadata item name is supplied, then only the single item is
returned. Otherwise, the default is to return all metadata associated
with a server.
Arguments
Name
Type
Description
Default
$key
string
the (optional) name of the metadata item to return
Reboots a server You can pass the parameter RAXSDK_SOFT_REBOOT (default) or
RAXSDK_HARD_REBOOT to specify the type of reboot. A "soft" reboot
requests that the operating system reboot itself; a "hard" reboot
is the equivalent of pulling the power plug and then turning it back
on, with a possibility of data loss.
Arguments
Name
Type
Description
Default
$type
string
either 'soft' (the default) or 'hard' to
indicate the type of reboot
RAXSDK_SOFT_REBOOT
Return value
Type
Description
boolean
TRUE on success; FALSE on failure
Tags
Name
Description
api
Rebuild(
array
$params
= array(),
)
:
n/a
Description
Rebuilds an existing server
Arguments
Name
Type
Description
Default
$params
array
an associative array of key/value pairs of
attributes to set on the new server
Creates a new Server object and associates it with a Compute service
Arguments
Name
Type
Description
Default
$service
n/a
$info
mixed
If NULL, an empty Server object is created
If an object, then a Server object is created from the data in the
object
If a string, then it's treated as a Server ID and retrieved from the
service
The normal use case for SDK clients is to treat it as either NULL or an
ID. The object value parameter is a special case used to construct
a Server object from a ServerList element to avoid a secondary
call to the Service.
Returns the primary external IP address of the server This function is based upon the accessIPv4 and accessIPv6 values.
By default, these are set to the public IP address of the server.
However, these values can be modified by the user; this might happen,
for example, if the server is behind a firewall and needs to be
routed through a NAT device to be reached.
Arguments
Name
Type
Description
Default
$ip_type
integer
the type of IP version (4 or 6) to return
RAXSDK_DEFAULT_IP_VERSION
Return value
Type
Description
string
IP address
Tags
Name
Description
api
ips(
string
$network
= null,
)
:
object
Description
Returns the IP address block for the Server or for a specific network
Arguments
Name
Type
Description
Default
$network
string
if supplied, then only the IP(s) for
the specified network are returned. Otherwise, all IPs are returned.
Metadata The Metadata class represents either Server or Image metadata
Nova Nova is an abstraction layer for the OpenStack compute service.
ObjectStore Intermediate (abstract) class to implement shared
features of all object-storage classes
PersistentObject represents an object that has the ability to be
retrieved, created, updated, and deleted.
Service This class defines a "service"—a relationship between a specific OpenStack
and a provided service, represented by a URL in the service catalog.
ServiceCatalogItem Holds information on a single service from the Service Catalog
Curl The CurlRequest class is a simple wrapper to CURL functions. Not only does
this permit stubbing of the interface as described under the HttpRequest
interface, it could potentially allow us to replace the interface methods
with other function calls in the future.
HttpRequestInterface The HttpRequest interface defines methods for wrapping CURL; this allows
those methods to be stubbed out for unit testing, thus allowing us to
test without actually making live calls.
Response
Blank The HttpResponse returns an object with status information, separated
headers, and any response body necessary.
Http The HttpResponse returns an object with status information, separated
headers, and any response body necessary.
Compute
Flavor The Flavor class represents a flavor defined by the Compute service
Image The Image class represents a stored machine image returned by the
Compute service.
Network The Network class represents a single virtual network
Server The Server class represents a single server node.
Record The Record class represents a single domain record
Service This class defines a "service"—a relationship between a specific OpenStack
and a provided service, represented by a URL in the service catalog.
Subdomain The Subdomain is basically another domain, albeit one that is a child of
a parent domain. In terms of the code involved, the JSON is slightly
different than a top-level domain, and the parent is a domain instead of
the DNS service itself.
Database
Database This class represents a Database in the Rackspace "Red Dwarf"
database-as-a-service product.
Instance Instance represents an instance of DbService, similar to a Server in a
Compute service
Service The Rackspace Database As A Service (aka "Red Dwarf")
User This class represents a User in the Rackspace "Red Dwarf"
database-as-a-service product.
LoadBalancer
Algorithm sub-resource to manage algorithms (read-only)
AllowedDomain sub-resource to manage allowed domains
BillableLoadBalancer used to get a list of billable load balancers for a specific date range
LoadBalancer The LoadBalancer class represents a single load balancer
Protocol sub-resource to manage protocols (read-only)
Node information on a single node in the load balancer
NodeEvent a single node event, usually called as part of a Collection
Readonly This defines a read-only SubResource - one that cannot be created, updated,
or deleted. Many subresources are like this, and this simplifies their
class definitions.
Stats Stats returns statistics about the load balancer
SubResource SubResource is an abstract class that handles subresources of a
LoadBalancer object; for example, the
`/loadbalancers/{id}/errorpage`. Since most of the subresources are
handled in a similar manner, this consolidates the functions.
Curl The CurlRequest class is a simple wrapper to CURL functions. Not only does
this permit stubbing of the interface as described under the HttpRequest
interface, it could potentially allow us to replace the interface methods
with other function calls in the future.
DataObject A DataObject is an object in the ObjectStore
Database This class represents a Database in the Rackspace "Red Dwarf"
database-as-a-service product.
HttpRequestInterface The HttpRequest interface defines methods for wrapping CURL; this allows
those methods to be stubbed out for unit testing, thus allowing us to
test without actually making live calls.
Rackspace Rackspace extends the OpenStack class with support for Rackspace's
API key and tenant requirements.
Readonly This defines a read-only SubResource - one that cannot be created, updated,
or deleted. Many subresources are like this, and this simplifies their
class definitions.
Service This class defines a "service"—a relationship between a specific OpenStack
and a provided service, represented by a URL in the service catalog.
Service The Compute class represents the OpenStack Nova service.
Service The Rackspace Database As A Service (aka "Red Dwarf")
Service This class defines a "service"—a relationship between a specific OpenStack
and a provided service, represented by a URL in the service catalog.
Stack The Stack class requires a CloudFormation template and may contain additional
parameters for that template.
Stats Stats returns statistics about the load balancer
SubResource SubResource is an abstract class that handles subresources of a
LoadBalancer object; for example, the
`/loadbalancers/{id}/errorpage`. Since most of the subresources are
handled in a similar manner, this consolidates the functions.
Subdomain The Subdomain is basically another domain, albeit one that is a child of
a parent domain. In terms of the code involved, the JSON is slightly
different than a top-level domain, and the parent is a domain instead of
the DNS service itself.