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
Methods summary
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
|
|
public
|
|
public
|
Methods inherited from OpenCloud\Common\Service\NovaService
Methods inherited from OpenCloud\Common\Service\CatalogService
getBaseUrl()
,
getExtensions()
,
getName()
,
getRegion()
,
getType()
,
getUrl()
,
getUrlType()
,
limits()
,
name()
,
region()
,
url()
Methods inherited from OpenCloud\Common\Service\AbstractService
collection()
,
getClient()
,
getEndpoint()
,
getNamespaces()
,
getResources()
,
namespaces()
,
resource()
,
resourceList()
,
setClient()
,
setEndpoint()
Methods inherited from OpenCloud\Common\Base
__call()
,
checkJsonError()
,
generateUuid()
,
getInstance()
,
getLogger()
,
hasLogger()
,
makeResourceIteratorOptions()
,
populate()
,
setLogger()
,
stripNamespace()
,
toCamel()
,
toUnderscores()
Constants summary
string |
DEFAULT_TYPE
|
#
'compute'
|
string |
DEFAULT_NAME
|
#
'cloudServersOpenStack'
|