Example #1
0
def get_microversion(request, feature):
    for service_name in ('volume', 'volumev2', 'volumev3'):
        try:
            cinder_url = base.url_for(request, service_name)
            break
        except exceptions.ServiceCatalogException:
            continue
    else:
        return None
    min_ver, max_ver = cinder_client.get_server_version(cinder_url)
    return (microversions.get_microversion_for_feature(
        'cinder', feature, api_versions.APIVersion, min_ver, max_ver))
Example #2
0
def get_microversion(request, feature):
    client = novaclient(request)
    min_ver, max_ver = api_versions._get_server_version_range(client)
    return (microversions.get_microversion_for_feature('nova', feature,
                                                       api_versions.APIVersion,
                                                       min_ver, max_ver))
Example #3
0
def get_microversion(request, feature):
    client = novaclient(request)
    min_ver, max_ver = api_versions._get_server_version_range(client)
    return (microversions.get_microversion_for_feature(
        'nova', feature, api_versions.APIVersion, min_ver, max_ver))