'Create a block device using the ICinderVolumeManager.
The cluster_id and dataset_id are stored as metadata on the volume.
See:
http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createVolume_v1__tenant_id__volumes_volumes.html'

def create_volume(self, dataset_id, size):

    metadata = {CLUSTER_ID_LABEL: unicode(self.cluster_id), DATASET_ID_LABEL: unicode(dataset_id)}
    requested_volume = self.cinder_volume_manager.create(size=int(Byte(size).to_GiB().value), metadata=metadata, display_name='flocker-{}'.format(dataset_id))
    Message.new(message_type=CINDER_CREATE, blockdevice_id=requested_volume.id).write()
    created_volume = wait_for_volume_state(volume_manager=self.cinder_volume_manager, expected_volume=requested_volume, desired_state=u'available', transient_states=(u'creating',))
    return _blockdevicevolume_from_cinder_volume(cinder_volume=created_volume)
