OpenCloud/Common/Nova.php

Properties

Description

An abstract class that defines shared components for products that use OpenStack Nova

Classes

Nova

Properties

 
 
Yes 
No 

Description

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.

Methods

Flavor, FlavorList, Request, __construct, load_namespaces,

Flavor( string   $id = null, ) : \OpenCloud\Common\Compute\Flavor

Description

Returns a flavor from the service
This is a factory method and should generally be called instead of creating a Flavor object directly.

Arguments

Name Type Description Default
$id string
  • if supplied, the Flavor identified by this is retrieved
null

Return value

Type Description
\OpenCloud\Common\Compute\Flavor object

Tags

Name Description
api

FlavorList( boolean   $details = true, array   $filter = array(), ) : \OpenCloud\Common\Collection

Description

Returns a list of Flavor objects
This is a factory method and should generally be called instead of creating a FlavorList object directly.

Arguments

Name Type Description Default
$details boolean
  • if TRUE (the default), returns full details. Set to FALSE to retrieve minimal details and possibly improve performance.
true
$filter array
  • optional key/value pairs for creating query strings
array()

Return value

Type Description
\OpenCloud\Common\Collection (or FALSE on an error)

Tags

Name Description
api

Request( string   $url, string   $method = 'GET', array   $headers = array(), string   $body = null, ) : \Rackspace\HttpResult

Description

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:

Arguments

Name Type Description Default
$url string
  • the URL of the request
$method string
  • the HTTP method ("GET" by default)
'GET'
$headers array
  • an associative array of headers to pass to the request
array()
$body string
  • optional body for POST or PUT requests
null

Return value

Type Description
\Rackspace\HttpResult object

__construct( \OpenCloud\Identity   $conn,   $serviceType, string   $serviceName, string   $serviceRegion, string   $urltype, ) : n/a

Description

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.

Arguments

Name Type Description Default
$conn \OpenCloud\Identity
  • a connection object
$serviceType n/a
$serviceName string
  • identifies the name of the service in the catalog
$serviceRegion string
  • identifies the region of this Compute service
$urltype string
  • identifies the URL type ("publicURL", "privateURL")

Return value

Type Description
n/a n/a

load_namespaces( ) : n/a

Description

Loads the available namespaces from the /extensions resource

Return value

Type Description
n/a n/a

Properties

$_url,

  private  $_url =




Documentation was generated by phpDocumentor 2.0.0b6 .

Namespaces

Packages