Class Nova
Nova is an abstraction layer for the OpenStack compute service.
Nova is used as a basis for several products, including Compute services as
well as Rackspace's Cloud Databases. This class is, in essence, a vehicle for
sharing common code between those other classes.
-
OpenCloud\Common\Base
-
OpenCloud\Common\Service
-
OpenCloud\Common\Nova
Methods summary
public
|
#
__construct( OpenCloud\OpenStack $conn, string $serviceType, string $serviceName, string $serviceRegion, string $urltype )
Called when creating a new Compute service object
Called when creating a new Compute service object
_NOTE_ that the order of parameters for this is different from the
parent Service class. This is because the earlier parameters are the ones that
most typically change, whereas the later ones are not modified as often.
Parameters
- $conn
OpenCloud\Identity $conn - a connection object
- $serviceType
string $serviceRegion - identifies the region of this Compute service
- $serviceName
string $urltype - identifies the URL type ("publicURL", "privateURL")
- $serviceRegion
string $serviceName - identifies the name of the service in the catalog
- $urltype
string $urltype - the specified URL from the catalog (e.g., "publicURL")
Overrides
|
public
Compute\Flavor
|
#
Flavor( string $id = null )
Returns a flavor from the service
Returns a flavor from the service
This is a factory method and should generally be called instead of creating a
Flavor object directly.
Parameters
- $id
string $id - if supplied, the Flavor identified by this is retrieved
Returns
Compute\Flavor object
Api
|
public
OpenCloud\Common\Collection
|
#
FlavorList( boolean $details = true, array $filter = array() )
Returns a list of Flavor objects
Returns a list of Flavor objects
This is a factory method and should generally be called instead of creating a
FlavorList object directly.
Parameters
- $details
boolean $details - if TRUE (the default), returns full details. Set to FALSE to retrieve
minimal details and possibly improve performance.
- $filter
array $filter - optional key/value pairs for creating query strings
Returns
Api
|
public
Rackspace\HttpResult
|
#
Request( string $url, string $method = 'GET', array $headers = array(), string $body = null )
Gets a request from an HTTP source and ensures that the content type is
always "application/json"
Gets a request from an HTTP source and ensures that the content type is
always "application/json"
This is a simple subclass of the parent::Request() method that ensures that
all Compute requests use application/json as the Content-Type:
Parameters
- $url
string $url - the URL of the request
- $method
string $method - the HTTP method ("GET" by default)
- $headers
array $headers - an associative array of headers to pass to the request
- $body
string $body - optional body for POST or PUT requests
Returns
Rackspace\HttpResult object
|
protected
|
#
load_namespaces( )
Loads the available namespaces from the /extensions resource
Loads the available namespaces from the /extensions resource
|
Methods inherited from OpenCloud\Common\Service
collection(),
extensions(),
getConnection(),
getCurrentNamespace(),
getResources(),
limits(),
name(),
namespaces(),
region(),
request(),
resolveResourceClass(),
resource(),
resourceList(),
setConnection(),
url()
|