Use service_type rather then service_name to identify endpoints

Appropriate flow for any tooling would be to check endpoints against
service types rather then their names.

Change-Id: If0fb6f9e24f5dac70109286b5cbfae81f841e799
This commit is contained in:
Dmitriy Rabotyagov
2024-12-09 11:12:42 +01:00
parent 50b6486df9
commit 978f711787

View File

@@ -60,7 +60,7 @@ def _get_service_url(request):
try:
catalog = (getattr(request.user, "service_catalog", []))
for c in catalog:
if c['name'] == 'freezer':
if c['type'] == 'backup':
for endpoint_type in endpoint_type_priority:
for e in c['endpoints']:
if e['interface'] in endpoint_type: