Overview

Namespaces

  • None
  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Exceptions
      • Log
      • Request
        • Response
    • Compute
    • Database
    • DNS
    • LoadBalancer
      • Resources
    • ObjectStore
      • Resource
    • Orchestration
    • Volume
  • PHP

Classes

  • Base
  • Collection
  • Lang
  • Metadata
  • Nova
  • PersistentObject
  • Service
  • ServiceCatalogItem
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

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
Extended by OpenCloud\Common\Service
Extended by OpenCloud\Common\Nova

Direct known subclasses

OpenCloud\Compute\Service, OpenCloud\Database\Service, OpenCloud\LoadBalancer\Service, OpenCloud\Volume\Service
Abstract
Namespace: OpenCloud\Common
Located at OpenCloud/Common/Nova.php
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

OpenCloud\Common\Service::__construct()
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

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

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()
Methods inherited from OpenCloud\Common\Base
__set(), checkJsonError(), getHttpRequestObject(), getLogger(), makeQueryString(), populate(), setLogger(), setProperty()
Properties inherited from OpenCloud\Common\Service
$_namespaces, $conn
PHP OpenCloud API API documentation generated by ApiGen 2.8.0