'Creates a data volume
Defaults to the first location'

def create_volume(self, size, name, location=None, snapshot=None, ex_volume_type=None):

    if (ex_volume_type is None):
        for diskOffering in self.ex_list_disk_offerings():
            if ((diskOffering.size == size) or diskOffering.customizable):
                break
        else:
            raise LibcloudError(('Disk    offering    with    size=%s    not    found' % size))
    else:
        for diskOffering in self.ex_list_disk_offerings():
            if (diskOffering.name == ex_volume_type):
                if (not diskOffering.customizable):
                    size = diskOffering.size
                break
        else:
            raise LibcloudError(('Volume    type    with    name=%s    not    found' % ex_volume_type))
    if (location is None):
        location = self.list_locations()[0]
    params = {'name': name, 'diskOfferingId': diskOffering.id, 'zoneId': location.id}
    if diskOffering.customizable:
        params['size'] = size
    requestResult = self._async_request(command='createVolume', params=params, method='GET')
    volumeResponse = requestResult['volume']
    state = self._to_volume_state(volumeResponse)
    return StorageVolume(id=volumeResponse['id'], name=name, size=size, state=state, driver=self, extra=dict(name=volumeResponse['name']))
