Require valid value for endpoint_type
Keystone accepts only the three types of endpoints (public, internal and admin), so the endpoint_type option should accept only these three types. Change-Id: I4850645f7b1a0b76b03f745498fd4fa15f2cd868
This commit is contained in:
parent
d8902ee621
commit
6eddae3804
@ -40,6 +40,8 @@ nova_opts = [
|
|||||||
help='Version of Nova API to be used.'),
|
help='Version of Nova API to be used.'),
|
||||||
cfg.StrOpt('endpoint_type',
|
cfg.StrOpt('endpoint_type',
|
||||||
default='publicURL',
|
default='publicURL',
|
||||||
|
choices=['publicURL', 'internalURL', 'adminURL',
|
||||||
|
'public', 'internal', 'admin'],
|
||||||
help='Endpoint type to be used with nova client calls.'),
|
help='Endpoint type to be used with nova client calls.'),
|
||||||
cfg.StrOpt('region_name',
|
cfg.StrOpt('region_name',
|
||||||
help='Region name for connecting to nova.'),
|
help='Region name for connecting to nova.'),
|
||||||
|
@ -37,6 +37,8 @@ glance_opts = [
|
|||||||
help='Region name for connecting to glance.'),
|
help='Region name for connecting to glance.'),
|
||||||
cfg.StrOpt('endpoint_type',
|
cfg.StrOpt('endpoint_type',
|
||||||
default='publicURL',
|
default='publicURL',
|
||||||
|
choices=['publicURL', 'internalURL', 'adminURL',
|
||||||
|
'public', 'internal', 'admin'],
|
||||||
help='Endpoint type to be used with glance client calls.'),
|
help='Endpoint type to be used with glance client calls.'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -55,6 +55,8 @@ neutron_opts = [
|
|||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'endpoint_type',
|
'endpoint_type',
|
||||||
default='publicURL',
|
default='publicURL',
|
||||||
|
choices=['publicURL', 'internalURL', 'adminURL',
|
||||||
|
'public', 'internal', 'admin'],
|
||||||
help='Endpoint type to be used with neutron client calls.'),
|
help='Endpoint type to be used with neutron client calls.'),
|
||||||
cfg.StrOpt(
|
cfg.StrOpt(
|
||||||
'region_name',
|
'region_name',
|
||||||
|
@ -136,7 +136,7 @@ class NovaclientTestCase(test.TestCase):
|
|||||||
data = {
|
data = {
|
||||||
'nova': {
|
'nova': {
|
||||||
'api_microversion': 'foo_api_microversion',
|
'api_microversion': 'foo_api_microversion',
|
||||||
'endpoint_type': 'foo_endpoint_type',
|
'endpoint_type': 'internalURL',
|
||||||
'region_name': 'foo_region_name',
|
'region_name': 'foo_region_name',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ class NovaclientTestCase(test.TestCase):
|
|||||||
data = {
|
data = {
|
||||||
'nova': {
|
'nova': {
|
||||||
'api_microversion': 'foo_api_microversion',
|
'api_microversion': 'foo_api_microversion',
|
||||||
'endpoint_type': 'foo_endpoint_type',
|
'endpoint_type': 'internalURL',
|
||||||
'region_name': 'foo_region_name',
|
'region_name': 'foo_region_name',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ class NeutronclientTestCase(test.TestCase):
|
|||||||
data = {
|
data = {
|
||||||
'neutron': {
|
'neutron': {
|
||||||
'url': 'http://localhost:9696',
|
'url': 'http://localhost:9696',
|
||||||
'endpoint_type': 'foo_endpoint_type',
|
'endpoint_type': 'internalURL',
|
||||||
'region_name': 'foo_region_name',
|
'region_name': 'foo_region_name',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -127,7 +127,7 @@ class NeutronclientTestCase(test.TestCase):
|
|||||||
data = {
|
data = {
|
||||||
'neutron': {
|
'neutron': {
|
||||||
'url': 'http://localhost:9696',
|
'url': 'http://localhost:9696',
|
||||||
'endpoint_type': 'foo_endpoint_type',
|
'endpoint_type': 'internalURL',
|
||||||
'region_name': 'foo_region_name',
|
'region_name': 'foo_region_name',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ class CinderclientTestCase(test.TestCase):
|
|||||||
data = {
|
data = {
|
||||||
'cinder': {
|
'cinder': {
|
||||||
'http_retries': 3,
|
'http_retries': 3,
|
||||||
'endpoint_type': 'foo_endpoint_type',
|
'endpoint_type': 'internalURL',
|
||||||
'region_name': 'foo_region_name',
|
'region_name': 'foo_region_name',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ class CinderclientTestCase(test.TestCase):
|
|||||||
data = {
|
data = {
|
||||||
'cinder': {
|
'cinder': {
|
||||||
'http_retries': 3,
|
'http_retries': 3,
|
||||||
'endpoint_type': 'foo_endpoint_type',
|
'endpoint_type': 'internalURL',
|
||||||
'region_name': 'foo_region_name',
|
'region_name': 'foo_region_name',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,8 @@ cinder_opts = [
|
|||||||
help='Number of cinderclient retries on failed HTTP calls.'),
|
help='Number of cinderclient retries on failed HTTP calls.'),
|
||||||
cfg.StrOpt('endpoint_type',
|
cfg.StrOpt('endpoint_type',
|
||||||
default='publicURL',
|
default='publicURL',
|
||||||
|
choices=['publicURL', 'internalURL', 'adminURL',
|
||||||
|
'public', 'internal', 'admin'],
|
||||||
help='Endpoint type to be used with cinder client calls.'),
|
help='Endpoint type to be used with cinder client calls.'),
|
||||||
cfg.StrOpt('region_name',
|
cfg.StrOpt('region_name',
|
||||||
help='Region name for connecting to cinder.'),
|
help='Region name for connecting to cinder.'),
|
||||||
|
Loading…
Reference in New Issue
Block a user