Skip to content

Commit

Permalink
Choose a specific keystone endpoint URL from config knob if provided.
Browse files Browse the repository at this point in the history
Change-Id: I160f15e36c496c6d65e6d5709cf656b360ee91c5
Closes-Bug: #1518179
(cherry picked from commit d686a12)
  • Loading branch information
Hampapur Ajay committed Dec 1, 2015
1 parent fb188dd commit bf58ef3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/config/vnc_openstack/vnc_openstack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ def fill_keystone_opts(obj, conf_sections):
except ConfigParser.NoOptionError:
obj._project_name = obj._admin_tenant

try:
# Get the endpoint_type
obj._endpoint_type = conf_sections.get('KEYSTONE', 'endpoint_type')
except ConfigParser.NoOptionError:
obj._endpoint_type = None

def _create_default_security_group(vnc_lib, proj_obj):
def _get_rule(ingress, sg, prefix, ethertype):
sgr_uuid = str(uuid.uuid4())
Expand Down Expand Up @@ -407,6 +413,12 @@ def _ksv3_get_conn(self):
password=self._auth_passwd,
tenant_name=self._admin_tenant,
auth_url=self._auth_url)

if self._endpoint_type and self._ks.service_catalog:
self._ks.management_url = \
self._ks.service_catalog.get_urls(
service_type='identity',
endpoint_type=self._endpoint_type)[0]
# end _ksv3_get_conn

def _ksv3_domains_list(self):
Expand Down

0 comments on commit bf58ef3

Please sign in to comment.