Class Service
The Compute class represents the OpenStack Nova service.
It is constructed from a OpenStack object and requires a service name, region, and URL type to select the proper endpoint from the service catalog. However, constants can be used to define default values for these to make it easier to use:
Creating a compute object:
$rackspace = new OpenCloud\Rackspace(...); $dallas = new Compute( $rackspace, // connection 'cloudServersOpenStack', // the service's name 'DFW', // region identifier 'publicURL' // URL type );
The easy way (with defaults); this assumes that the constants (RAXSDK_...) are defined elsewhere before the inclusion of the first SDK library file:
$rackspace = new OpenCloud\Rackspace(...); $dallas = new OpenCloud\Compute($rackspace); // uses defaults
- OpenCloud\Common\Base
-
OpenCloud\Common\Service\AbstractService implements OpenCloud\Common\Service\ServiceInterface
-
OpenCloud\Common\Service\CatalogService
-
OpenCloud\Common\Service\NovaService
-
OpenCloud\Compute\Service
public
|
#
__construct(
Creates a service object, based off the specified client. |
public
|
|
public
|
#
serverList( boolean $details = true, array $filter = array() )
Returns a Collection of server objects, filtered by the specified parameters |
public
|
|
public
|
|
public
|
|
public
OpenCloud\Common\Collection
|
|
public
|
|
public
|
flavor(),
flavorList(),
loadNamespaces()
|
getBaseUrl(),
getExtensions(),
getName(),
getRegion(),
getType(),
getUrl(),
getUrlType(),
limits()
|
string |
DEFAULT_TYPE
|
# 'compute' |
string |
DEFAULT_NAME
|
# 'cloudServersOpenStack' |
DEFAULT_URL_TYPE,
SUPPORTED_VERSION
|
PATCH_CONTENT_TYPE
|
protected
array
|
$additionalExtensions
|
# array('OS-FLV-DISABLED') |
$regionless
|
$client,
$endpoint,
$namespaces,
$resources
|
$aliases
|