PHP Class LibCloud\Compute\Providers\Rackspace\RackspaceProvider

Inheritance: extends LibCloud\Compute\Base
Show file Open project: linkorb/libcloud-php Class Usage Examples

Protected Properties

Property Type Description
$client
$locations
$service

Public Methods

Method Description
bootNode ( Node $node )
cloneNode ( Node $node, Symfony\Component\HttpFoundation\ParameterBag $parameters )
createNode ( Symfony\Component\HttpFoundation\ParameterBag $parameters )
destroyNode ( Node $node ) : Guzzle\Http\Message\Response
getClient ( ) : OpenCloud\Rackspace
getService ( ) : OpenCloud\Compute\Service
listImages ( $nodeImageId = null )
listLocations ( $nodeLocationId = null )
listNodes ( $nodeId = null )
listSizes ( $nodeSizeId = null )
rebootNode ( Node $node ) : Guzzle\Http\Message\Response
resizeNode ( Node $node, NodeSize $nodeSize ) : Guzzle\Http\Message\Response
setClient ( OpenCloud\Rackspace $client )
setService ( OpenCloud\Compute\Service $service )
shutdownNode ( Node $node )
updateNode ( Node $node, Symfony\Component\HttpFoundation\ParameterBag $parameters ) : Guzzle\Http\Message\Response

Protected Methods

Method Description
toFlavor ( NodeSize $nodeSize ) : OpenCloud\Compute\Resource\Flavor Get a flavor instance represented by the supplied NodeSize.
toImage ( $response ) : NodeImage Convert OpenCloud\Compute\Resource\Image to LibCloud\Compute\Model\NodeImage.
toLocation ( $response ) : NodeLocation Convert array to LibCloud\Compute\Model\NodeLocation.
toNode ( $response ) : Node Convert OpenCloud\Compute\Resource\Server to LibCloud\Compute\Model\Node.
toServer ( Node $node = null ) : OpenCloud\Compute\Resource\Server Get a server instance represented by the supplied Node, or an empty server instance if a Node is not supplied.
toSize ( $response ) : NodeSize Convert OpenCloud\Compute\Resource\Flavor to LibCloud\Compute\Model\NodeSize.

Private Methods

Method Description
getObjectVarsRecursively ( $var )
toNodeModelExtra ( object $response, array | null $exclude = null ) : array Populate an array, suitable for Compute\Model\Node*.extra, with the public properties of an OpenCloud\Compute\Resource entity.
unserialiseCredentials ( string $accessToken ) : array "username:api_key" -> ['username' => "username", 'apiKey' => "api_key"]

Method Details

bootNode() public method

public bootNode ( Node $node )
$node LibCloud\Compute\Model\Node

cloneNode() public method

public cloneNode ( Node $node, Symfony\Component\HttpFoundation\ParameterBag $parameters )
$node LibCloud\Compute\Model\Node
$parameters Symfony\Component\HttpFoundation\ParameterBag

createNode() public method

public createNode ( Symfony\Component\HttpFoundation\ParameterBag $parameters )
$parameters Symfony\Component\HttpFoundation\ParameterBag

destroyNode() public method

public destroyNode ( Node $node ) : Guzzle\Http\Message\Response
$node LibCloud\Compute\Model\Node
return Guzzle\Http\Message\Response

getClient() public method

public getClient ( ) : OpenCloud\Rackspace
return OpenCloud\Rackspace

getService() public method

public getService ( ) : OpenCloud\Compute\Service
return OpenCloud\Compute\Service

listImages() public method

public listImages ( $nodeImageId = null )

listLocations() public method

public listLocations ( $nodeLocationId = null )

listNodes() public method

public listNodes ( $nodeId = null )

listSizes() public method

public listSizes ( $nodeSizeId = null )

rebootNode() public method

public rebootNode ( Node $node ) : Guzzle\Http\Message\Response
$node LibCloud\Compute\Model\Node
return Guzzle\Http\Message\Response

resizeNode() public method

public resizeNode ( Node $node, NodeSize $nodeSize ) : Guzzle\Http\Message\Response
$node LibCloud\Compute\Model\Node
$nodeSize LibCloud\Compute\Model\NodeSize
return Guzzle\Http\Message\Response

setClient() public method

public setClient ( OpenCloud\Rackspace $client )
$client OpenCloud\Rackspace

setService() public method

public setService ( OpenCloud\Compute\Service $service )
$service OpenCloud\Compute\Service

shutdownNode() public method

public shutdownNode ( Node $node )
$node LibCloud\Compute\Model\Node

toFlavor() protected method

Get a flavor instance represented by the supplied NodeSize.
protected toFlavor ( NodeSize $nodeSize ) : OpenCloud\Compute\Resource\Flavor
$nodeSize LibCloud\Compute\Model\NodeSize
return OpenCloud\Compute\Resource\Flavor

toImage() protected method

Convert OpenCloud\Compute\Resource\Image to LibCloud\Compute\Model\NodeImage.
protected toImage ( $response ) : NodeImage
return LibCloud\Compute\Model\NodeImage

toLocation() protected method

Convert array to LibCloud\Compute\Model\NodeLocation.
protected toLocation ( $response ) : NodeLocation
return LibCloud\Compute\Model\NodeLocation

toNode() protected method

Note that it is the responsibility of calling methods to populate the resulant Node with its NodeImage and NodeSize.
protected toNode ( $response ) : Node
return LibCloud\Compute\Model\Node

toServer() protected method

Get a server instance represented by the supplied Node, or an empty server instance if a Node is not supplied.
protected toServer ( Node $node = null ) : OpenCloud\Compute\Resource\Server
$node LibCloud\Compute\Model\Node
return OpenCloud\Compute\Resource\Server

toSize() protected method

Convert OpenCloud\Compute\Resource\Flavor to LibCloud\Compute\Model\NodeSize.
protected toSize ( $response ) : NodeSize
return LibCloud\Compute\Model\NodeSize

updateNode() public method

public updateNode ( Node $node, Symfony\Component\HttpFoundation\ParameterBag $parameters ) : Guzzle\Http\Message\Response
$node LibCloud\Compute\Model\Node
$parameters Symfony\Component\HttpFoundation\ParameterBag
return Guzzle\Http\Message\Response

Property Details

$client protected property

protected $client

$locations protected property

protected $locations

$service protected property

protected $service