Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CDN
      • Resource
    • CloudMonitoring
      • Collection
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Log
      • Resource
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Collection
      • Resource
    • Identity
      • Constants
      • Resource
    • Image
      • Enum
      • Resource
        • JsonPatch
        • Schema
    • LoadBalancer
      • Collection
      • Enum
      • Resource
    • Networking
      • Resource
    • ObjectStore
      • Constants
      • Enum
      • Exception
      • Resource
      • Upload
    • Orchestration
      • Resource
    • Queues
      • Collection
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • OpenStack
  • Rackspace
  • Version
  • Overview
  • Namespace
  • Class
  • Tree

Class OpenStack

The main client of the library. This object is the central point of negotiation between your application and the API because it handles all of the HTTP transactions required to perform operations. It also manages the services for your application through convenient factory methods.

Guzzle\Http\Client
Extended by OpenCloud\Common\Http\Client
Extended by OpenCloud\OpenStack

Direct known subclasses

OpenCloud\Rackspace
Namespace: OpenCloud
Located at OpenCloud/OpenStack.php
Methods summary
public
# __construct( mixed $url, array $secret, array $options = array() )

Overrides

OpenCloud\Common\Http\Client::__construct()
public mixed
# setSecret( array $secret = array() )

Set the credentials for the client

Set the credentials for the client

Parameters

$secret

Returns

mixed
$this
public array
# getSecret( )

Get the secret.

Get the secret.

Returns

array
array
public mixed
# setToken( string $token )

Set the token. If a string is passed in, the SDK assumes you want to set the ID of the full Token object and sets this property accordingly. For any other data type, it assumes you want to populate the Token object. This ambiguity arises due to backwards compatibility.

Set the token. If a string is passed in, the SDK assumes you want to set the ID of the full Token object and sets this property accordingly. For any other data type, it assumes you want to populate the Token object. This ambiguity arises due to backwards compatibility.

Parameters

$token

Returns

mixed
$this
public string
# getToken( )

Get the token ID for this client.

Get the token ID for this client.

Returns

string
string
public
# setTokenObject( OpenCloud\Identity\Resource\Token $token )

Set the full token object

Set the full token object

public
# getTokenObject( )

Get the full token object.

Get the full token object.

public mixed
# setTenant( mixed $tenant )

Set the tenant. If an integer or string is passed in, the SDK assumes you want to set the ID of the full Tenant object and sets this property accordingly. For any other data type, it assumes you want to populate the Tenant object. This ambiguity arises due to backwards compatibility.

Set the tenant. If an integer or string is passed in, the SDK assumes you want to set the ID of the full Tenant object and sets this property accordingly. For any other data type, it assumes you want to populate the Tenant object. This ambiguity arises due to backwards compatibility.

Parameters

$tenant

Returns

mixed
$this
public string
# getTenant( )

Returns the tenant ID only (backwards compatibility).

Returns the tenant ID only (backwards compatibility).

Returns

string
string
public
# setTenantObject( OpenCloud\Identity\Resource\Tenant $tenant )

Set the full Tenant object for this client.

Set the full Tenant object for this client.

Parameters

$tenant
public OpenCloud\Identity\Resource\Tenant
# getTenantObject( )

Get the full Tenant object for this client.

Get the full Tenant object for this client.

Returns

OpenCloud\Identity\Resource\Tenant
OpenCloud\Identity\Resource\Tenant
public mixed
# setCatalog( mixed $catalog )

Set the service catalog.

Set the service catalog.

Parameters

$catalog

Returns

mixed
$this
public array
# getCatalog( )

Get the service catalog.

Get the service catalog.

Returns

array
array
public mixed
# setLogger( Psr\Log\LoggerInterface $logger )

Parameters

$logger

Returns

mixed
$this
public Psr\Log\LoggerInterface
# getLogger( )

Returns

Psr\Log\LoggerInterface
LoggerInterface
public boolean
# hasLogger( )

Returns

boolean
bool
public string
# getCredentials( )

Formats the credentials array (as a string) for authentication

Formats the credentials array (as a string) for authentication

Returns

string
string

Throws

OpenCloud\Common\Exceptions\CredentialError
Common\Exceptions\CredentialError
public mixed
# setAuthUrl( mixed $url )

Parameters

$url

Returns

mixed
$this
public Guzzle\Http\Url
# getAuthUrl( )

Returns

Guzzle\Http\Url
Url
public
# setUser( OpenCloud\Identity\Resource\User $user )

Sets the current user based on the generated token.

Sets the current user based on the generated token.

Parameters

$user
of user data
public OpenCloud\Identity\Resource\User
# getUser( )

Returns

OpenCloud\Identity\Resource\User
\OpenCloud\Identity\Resource\User
public
# authenticate( )

Authenticate the tenant using the supplied credentials

Authenticate the tenant using the supplied credentials

Throws

AuthenticationError
AuthenticationError
public array
# exportCredentials( )

Convenience method for exporting current credentials. Useful for local caching.

Convenience method for exporting current credentials. Useful for local caching.

Returns

array
array
public
# importCredentials( array $values )

Convenience method for importing credentials. Useful for local caching because it reduces HTTP traffic.

Convenience method for importing credentials. Useful for local caching because it reduces HTTP traffic.

Parameters

$values
public OpenCloud\ObjectStore\Service
# objectStoreService( string $name = null, string $region = null, string $urltype = null )

Creates a new ObjectStore object (Swift/Cloud Files)

Creates a new ObjectStore object (Swift/Cloud Files)

Parameters

$name
The name of the service as it appears in the Catalog
$region
The region (DFW, IAD, ORD, LON, SYD)
$urltype
The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\ObjectStore\Service
\OpenCloud\ObjectStore\Service
public OpenCloud\Compute\Service
# computeService( string $name = null, string $region = null, string $urltype = null )

Creates a new Compute object (Nova/Cloud Servers)

Creates a new Compute object (Nova/Cloud Servers)

Parameters

$name
The name of the service as it appears in the Catalog
$region
The region (DFW, IAD, ORD, LON, SYD)
$urltype
The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Compute\Service
\OpenCloud\Compute\Service
public OpenCloud\Orchestration\Service
# orchestrationService( string $name = null, string $region = null, string $urltype = null )

Creates a new Orchestration (Heat) service object

Creates a new Orchestration (Heat) service object

Parameters

$name
The name of the service as it appears in the Catalog
$region
The region (DFW, IAD, ORD, LON, SYD)
$urltype
The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Orchestration\Service
\OpenCloud\Orchestration\Service

CodeCoverageIgnore

public OpenCloud\Volume\Service
# volumeService( string $name = null, string $region = null, string $urltype = null )

Creates a new Volume (Cinder) service object

Creates a new Volume (Cinder) service object

Parameters

$name
The name of the service as it appears in the Catalog
$region
The region (DFW, IAD, ORD, LON, SYD)
$urltype
The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Volume\Service
\OpenCloud\Volume\Service
public OpenCloud\Identity\Service
# identityService( )

Creates a new Rackspace "Cloud Identity" service.

Creates a new Rackspace "Cloud Identity" service.

Returns

OpenCloud\Identity\Service
\OpenCloud\Identity\Service
public OpenCloud\Common\Service\ServiceInterface
# imageService( string $name = null, string $region = null, string $urltype = null )

Creates a new Glance service

Creates a new Glance service

Parameters

$name
The name of the service as it appears in the Catalog
$region
The region (DFW, IAD, ORD, LON, SYD)
$urltype
The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Common\Service\ServiceInterface
Common\Service\ServiceInterface
public OpenCloud\Networking\Service
# networkingService( string $name = null, string $region = null, string $urltype = null )

Creates a new Networking (Neutron) service object

Creates a new Networking (Neutron) service object

Parameters

$name
The name of the service as it appears in the Catalog
$region
The region (DFW, IAD, ORD, LON, SYD)
$urltype
The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Networking\Service
\OpenCloud\Networking\Service

CodeCoverageIgnore

public OpenCloud\Cdn\Service
# cdnService( string $name = null, string $region = null, string $urltype = null )

Creates a new CDN (Poppy) service object

Creates a new CDN (Poppy) service object

Parameters

$name
The name of the service as it appears in the Catalog
$region
The region (DFW, IAD, ORD, LON, SYD)
$urltype
The URL type ("publicURL" or "internalURL")

Returns

OpenCloud\Cdn\Service
\OpenCloud\Cdn\Service

CodeCoverageIgnore

Methods inherited from OpenCloud\Common\Http\Client
getDefaultUserAgent(), getUserAgent()
Constants inherited from OpenCloud\Common\Http\Client
MINIMUM_PHP_VERSION, VERSION
API documentation generated by ApiGen 2.8.0