Use admin URL in StarlingX dashboard
This commit sets the endpoint type for all non OpenStack services to admin as the internal and admin URLs are identical. The change will enable the elimination of 80% of redundant endpoints in the central cloud. As a result, load to keystone service as part of add subcloud as well as endpoint table size is cut by 40%. Tests: - Successfully navigate to each panel and pane of the system controller/central cloud. - Successfully switch to a subcloud. - Successfully navigate to each panel and pane of a subcloud. Closes-bug: 1869790 Change-Id: I8de8d22e4db062ed10a4dbfe1885653d231fc104 Signed-off-by: Tee Ngo <tee.ngo@windriver.com>
This commit is contained in:
parent
654fb17485
commit
a5fc60921f
|
@ -30,7 +30,7 @@ DEFAULT_CONFIG_NAME = "all clouds default"
|
|||
|
||||
@memoized
|
||||
def dcmanagerclient(request):
|
||||
endpoint = base.url_for(request, 'dcmanager', 'adminURL')
|
||||
endpoint = base.url_for(request, 'dcmanager')
|
||||
c = client.Client(project_id=request.user.project_id,
|
||||
user_id=request.user.id,
|
||||
auth_token=request.user.token.id,
|
||||
|
|
|
@ -117,7 +117,7 @@ def cgtsclient(request):
|
|||
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
||||
|
||||
# FIXME this returns the wrong URL
|
||||
endpoint = base.url_for(request, 'platform', 'adminURL')
|
||||
endpoint = base.url_for(request, 'platform')
|
||||
version = 1
|
||||
|
||||
LOG.debug('cgtsclient connection created using token "%s" and url "%s"',
|
||||
|
@ -127,8 +127,7 @@ def cgtsclient(request):
|
|||
|
||||
return cgts_client.Client(version=version,
|
||||
endpoint=endpoint,
|
||||
auth_url=base.url_for(request, 'identity',
|
||||
'adminURL'),
|
||||
auth_url=base.url_for(request, 'identity'),
|
||||
token=request.user.token.id, # os_auth_token
|
||||
username=request.user.username,
|
||||
password=request.user.token.id,
|
||||
|
|
|
@ -73,7 +73,7 @@ if distributed_cloud_role and distributed_cloud_role in ['systemcontroller',
|
|||
HORIZON_CONFIG["user_home"] = \
|
||||
"starlingx_dashboard.utils.settings.get_user_home"
|
||||
|
||||
OPENSTACK_ENDPOINT_TYPE = "internalURL"
|
||||
OPENSTACK_ENDPOINT_TYPE = "adminURL"
|
||||
|
||||
# Override Django tempory file upload directory
|
||||
# Directory in which upload streamed files will be temporarily saved. A value
|
||||
|
|
Loading…
Reference in New Issue