diff --git a/manila/compute/nova.py b/manila/compute/nova.py index 08fb046c90..1e1fd3ba2e 100644 --- a/manila/compute/nova.py +++ b/manila/compute/nova.py @@ -40,6 +40,8 @@ nova_opts = [ help='Version of Nova API to be used.'), cfg.StrOpt('endpoint_type', default='publicURL', + choices=['publicURL', 'internalURL', 'adminURL', + 'public', 'internal', 'admin'], help='Endpoint type to be used with nova client calls.'), cfg.StrOpt('region_name', help='Region name for connecting to nova.'), diff --git a/manila/image/glance.py b/manila/image/glance.py index 4f4203edc5..bfc556aa0b 100644 --- a/manila/image/glance.py +++ b/manila/image/glance.py @@ -37,6 +37,8 @@ glance_opts = [ help='Region name for connecting to glance.'), cfg.StrOpt('endpoint_type', default='publicURL', + choices=['publicURL', 'internalURL', 'adminURL', + 'public', 'internal', 'admin'], help='Endpoint type to be used with glance client calls.'), ] diff --git a/manila/network/neutron/api.py b/manila/network/neutron/api.py index c675925566..17d59a4e48 100644 --- a/manila/network/neutron/api.py +++ b/manila/network/neutron/api.py @@ -55,6 +55,8 @@ neutron_opts = [ cfg.StrOpt( 'endpoint_type', default='publicURL', + choices=['publicURL', 'internalURL', 'adminURL', + 'public', 'internal', 'admin'], help='Endpoint type to be used with neutron client calls.'), cfg.StrOpt( 'region_name', diff --git a/manila/tests/compute/test_nova.py b/manila/tests/compute/test_nova.py index d5df358976..14ba86e391 100644 --- a/manila/tests/compute/test_nova.py +++ b/manila/tests/compute/test_nova.py @@ -136,7 +136,7 @@ class NovaclientTestCase(test.TestCase): data = { 'nova': { 'api_microversion': 'foo_api_microversion', - 'endpoint_type': 'foo_endpoint_type', + 'endpoint_type': 'internalURL', 'region_name': 'foo_region_name', } } @@ -161,7 +161,7 @@ class NovaclientTestCase(test.TestCase): data = { 'nova': { 'api_microversion': 'foo_api_microversion', - 'endpoint_type': 'foo_endpoint_type', + 'endpoint_type': 'internalURL', 'region_name': 'foo_region_name', } } diff --git a/manila/tests/network/neutron/test_neutron_api.py b/manila/tests/network/neutron/test_neutron_api.py index 11affea9ef..1d65c4cc75 100644 --- a/manila/tests/network/neutron/test_neutron_api.py +++ b/manila/tests/network/neutron/test_neutron_api.py @@ -100,7 +100,7 @@ class NeutronclientTestCase(test.TestCase): data = { 'neutron': { 'url': 'http://localhost:9696', - 'endpoint_type': 'foo_endpoint_type', + 'endpoint_type': 'internalURL', 'region_name': 'foo_region_name', } } @@ -127,7 +127,7 @@ class NeutronclientTestCase(test.TestCase): data = { 'neutron': { 'url': 'http://localhost:9696', - 'endpoint_type': 'foo_endpoint_type', + 'endpoint_type': 'internalURL', 'region_name': 'foo_region_name', } } diff --git a/manila/tests/volume/test_cinder.py b/manila/tests/volume/test_cinder.py index a6b7d55be2..d116ea74e7 100644 --- a/manila/tests/volume/test_cinder.py +++ b/manila/tests/volume/test_cinder.py @@ -57,7 +57,7 @@ class CinderclientTestCase(test.TestCase): data = { 'cinder': { 'http_retries': 3, - 'endpoint_type': 'foo_endpoint_type', + 'endpoint_type': 'internalURL', 'region_name': 'foo_region_name', } } @@ -82,7 +82,7 @@ class CinderclientTestCase(test.TestCase): data = { 'cinder': { 'http_retries': 3, - 'endpoint_type': 'foo_endpoint_type', + 'endpoint_type': 'internalURL', 'region_name': 'foo_region_name', } } diff --git a/manila/volume/cinder.py b/manila/volume/cinder.py index 9a74341a42..ea93b5d6e2 100644 --- a/manila/volume/cinder.py +++ b/manila/volume/cinder.py @@ -44,6 +44,8 @@ cinder_opts = [ help='Number of cinderclient retries on failed HTTP calls.'), cfg.StrOpt('endpoint_type', default='publicURL', + choices=['publicURL', 'internalURL', 'adminURL', + 'public', 'internal', 'admin'], help='Endpoint type to be used with cinder client calls.'), cfg.StrOpt('region_name', help='Region name for connecting to cinder.'),