Volumes v1


Rackspace setup

The first step is to pass in your credentials and set up a client. For Rackspace users, you will need your username and API key:

use OpenCloud\Rackspace;

$client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, array(
  'username' => '{username}',
  'apiKey'   => '{apiKey}',

OpenStack setup

If you’re an OpenStack user, you will also need to prove a few other configuration parameters:

$client = new OpenCloud\OpenStack('{keystoneUrl}', array(
  'username' => '{username}',
  'password' => '{apiKey}',
  'tenantId' => '{tenantId}',

Volume service

Now to instantiate the Volume service:

$service = $client->volumeService('{catalogName}', '{region}', '{urlType}');
  • {catalogName} is the name of the service as it appears in the service catalog. OpenStack users must set this value. For Rackspace users, a default will be provided if you pass in null.
  • {region} is the region the service will operate in. For Rackspace users, you can select one of the following from the supported regions page.
  • {urlType} is the type of URL to use, depending on which endpoints your catalog provides. If omitted, it will default to the public network.


A volume is a detachable block storage device. You can think of it as a USB hard drive. It can only be attached to one instance at a time.
volume type
Providers may support multiple types of volumes; at Rackspace, a volume can either be SSD (solid state disk: expensive, high-performance) or SATA (serial attached storage: regular disks, less expensive).
A snapshot is a point-in-time copy of the data contained in a volume.