'Create a volume.'

def create_volume(self, volume):

    volume_type = self._get_volume_type(volume)
    opts = self._get_volume_params(volume_type)
    if ((opts.get('hypermetro') == 'true') and (opts.get('replication_enabled') == 'true')):
        err_msg = _('Hypermetro    and    Replication    can    not    be    used    in    the    same    volume_type.')
        LOG.error(err_msg)
        raise exception.VolumeBackendAPIException(data=err_msg)
    (lun_params, lun_info, model_update) = self._create_base_type_volume(opts, volume, volume_type)
    model_update = self._add_extend_type_to_volume(opts, lun_params, lun_info, model_update)
    model_update['provider_location'] = huawei_utils.to_string(**model_update.pop('metadata'))
    return model_update
