Overview
  • Namespace
  • Class

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

Classes

  • OpenStack
  • Rackspace
  • Version

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( $url, array $secret, array $options = array() )
public
# setSecret( array $secret = array() )

Set the credentials for the client

Set the credentials for the client

Parameters

$secret

Returns


$this
public array
# getSecret( )

Get the secret.

Get the secret.

Returns

array
public
# 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


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

Set the full token object

public
# getTokenObject( )

Get the full token object.

Get the full token object.

public
# setExpiration( $expiration )

Deprecated

public
# getExpiration( )

Deprecated

public
# 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


$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
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
# setCatalog( mixed $catalog )

Set the service catalog.

Set the service catalog.

Parameters

$catalog

Returns


$this
public array
# getCatalog( )

Get the service catalog.

Get the service catalog.

Returns

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

Parameters

$logger

Returns


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

Returns

Psr\Log\LoggerInterface
public boolean
# hasLogger( )

Returns

boolean
public
# hasExpired( )

Deprecated

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
# setAuthUrl( $url )

Parameters

$url

Returns


$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
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
# getUrl( )

Deprecated

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
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
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
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

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
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
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
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

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

Codecoverageignore

Methods inherited from OpenCloud\Common\Http\Client

getDefaultUserAgent(), getUserAgent()

API documentation generated by ApiGen