Add 'region_name' to neutron client config
This commit add 'region_name' to neutron_client config. It allows operators to choose the region of the neutron endpoint to use. Change-Id: I7fe14c9621d3a40ee27c9f06855d466a6d3789d3 Closes-Bug: #1831683
This commit is contained in:
parent
6e307cc274
commit
d3d4b169a9
|
@ -77,8 +77,10 @@ class OpenStackClients(object):
|
|||
if self._get_client_option('neutron', 'insecure'):
|
||||
session.verify = False
|
||||
endpoint_type = self._get_client_option('neutron', 'endpoint_type')
|
||||
region_name = self._get_client_option('neutron', 'region_name')
|
||||
self._neutron = neutronclient.Client(session=session,
|
||||
endpoint_type=endpoint_type)
|
||||
endpoint_type=endpoint_type,
|
||||
region_name=region_name)
|
||||
|
||||
return self._neutron
|
||||
|
||||
|
|
|
@ -30,6 +30,9 @@ common_security_opts = [
|
|||
"be verified.")]
|
||||
|
||||
neutron_client_opts = [
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='publicURL',
|
||||
help='Type of endpoint in Identity service catalog to use '
|
||||
|
|
Loading…
Reference in New Issue