Merge "Require valid value for endpoint_type"

This commit is contained in:
Zuul 2024-10-10 18:40:49 +00:00 committed by Gerrit Code Review
commit ec3a8c7b73
7 changed files with 14 additions and 6 deletions

View File

@ -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.'),

View File

@ -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.'),
]

View File

@ -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',

View File

@ -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',
}
}

View File

@ -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',
}
}

View File

@ -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',
}
}

View File

@ -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.'),