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))
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))
def get_microversion(request, features): try: version, cinder_url = _find_cinder_url(request) except exceptions.ServiceCatalogException: return None insecure = settings.OPENSTACK_SSL_NO_VERIFY cacert = settings.OPENSTACK_SSL_CACERT min_ver, max_ver = cinder_client.get_server_version( cinder_url, insecure, cacert) return microversions.get_microversion_for_features('cinder', features, api_versions.APIVersion, min_ver, max_ver)
def get_microversion(request, features): for service_name in ('volume', 'volumev2', 'volumev3'): try: cinder_url = base.url_for(request, service_name) break except exceptions.ServiceCatalogException: continue else: return None insecure = settings.OPENSTACK_SSL_NO_VERIFY cacert = settings.OPENSTACK_SSL_CACERT min_ver, max_ver = cinder_client.get_server_version(cinder_url, insecure, cacert) return microversions.get_microversion_for_features( 'cinder', features, api_versions.APIVersion, min_ver, max_ver)