'Create a disco volume.'

def create_volume(self, volume):

    name = (self.configuration.disco_volume_name_prefix, volume['id'])
    vol_name = ''.join(name)
    vol_size = (volume['size'] * units.Ki)
    LOG.debug('Create    volume    :    [name]    %(vname)s    -    [size]    %(vsize)s.', {'vname': vol_name, 'vsize': six.text_type(vol_size)})
    reply = self.client.volumeCreate(vol_name, vol_size)
    status = reply['status']
    result = reply['result']
    LOG.debug('Create    volume    :    [status]    %(stat)s    -    [result]    %(res)s.', {'stat': six.text_type(status), 'res': result})
    if status:
        msg = (_('Error    while    creating    volume    [status]    %(stat)s    -    [result]    %(res)s.') % {'stat': six.text_type(status), 'res': result})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    LOG.debug('Volume    %s    created.', volume['name'])
    return {'provider_location': result}
