Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • 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
      • Enum
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

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

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
array
$secret

Returns

mixed
$this
public array
# getSecret( )

Get the secret.

Get the secret.

Returns

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
string
$token

Returns

mixed
$this
public string
# getToken( )

Get the token ID for this client.

Get the token ID for this client.

Returns

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

Set the full toke object

Set the full toke object

public
# getTokenObject( )

Get the full token object.

Get the full token object.

public mixed
# setTenant( string $tenant )

Set the tenant. If an integer 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 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
string
$tenant

Returns

mixed
$this
public string
# getTenant( )

Returns the tenant ID only (backwards compatibility).

Returns the tenant ID only (backwards compatibility).

Returns

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
OpenCloud\Identity\Resource\Tenant
$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
public mixed
# setCatalog( mixed $catalog )

Set the service catalog.

Set the service catalog.

Parameters

$catalog
mixed
$catalog

Returns

mixed
$this
public array
# getCatalog( )

Get the service catalog.

Get the service catalog.

Returns

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

Parameters

$logger
OpenCloud\Common\Log\LoggerInterface
$logger

Returns

mixed
$this
public OpenCloud\Common\Log\LoggerInterface
# getLogger( )

Returns

OpenCloud\Common\Log\LoggerInterface
public string
# getCredentials( )

Formats the credentials array (as a string) for authentication

Formats the credentials array (as a string) for authentication

Returns

string

Throws

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

Parameters

$url
mixed
$url

Returns

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

Returns

Guzzle\Http\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
mixed
$data Object of user data
public OpenCloud\Identity\Resource\User
# getUser( )

Returns

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

Authenticate the tenant using the supplied credentials

Authenticate the tenant using the supplied credentials

Throws

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
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
array
$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
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

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
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

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
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

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
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

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
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
string
$name The name of the service as it appears in the Catalog
$region
string
$region The region (DFW, IAD, ORD, LON, SYD)
$urltype
string
$urltype The URL type ("publicURL" or "internalURL")

Returns

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