Răsfoiți Sursa

HUE-8330 [cluster] Keep only external cluster configs in [[clusters]]

Currently we add a [[[Default]]] one to say that we want to say we also want the regular Hue
So basically then we don't need the last [[[Default]]]:

 [[clusters]]

    [[[engines]]]
      type=altus-engines
      hostname=...
      auth_key_id=...
      auth_key_secret=...

    [[[AltusV2]]]
      type=altusv2
      hostname=...
      auth_key_id=...
      auth_key_secret=...

    [[[Default]]]
      type=default
      hostname=...
      auth_key_id=...
      auth_key_secret=...
Romain Rigaux 7 ani în urmă
părinte
comite
9f99f697c5
1 a modificat fișierele cu 16 adăugiri și 16 ștergeri
  1. 16 16
      desktop/core/src/desktop/conf.py

+ 16 - 16
desktop/core/src/desktop/conf.py

@@ -1613,10 +1613,9 @@ def get_clusters(user):
   cluster_config = CLUSTERS.get()
 
   for i in cluster_config:
-    if i != 'Default':
-      # Get additional remote multi clusters
-      clusters.append(
-        (i, {
+    # Get additional remote multi clusters
+    clusters.append(
+      (i, {
           'id': i,
           'name': cluster_config[i].NAME.get() or i,
           'type': cluster_config[i].TYPE.get(),
@@ -1624,19 +1623,20 @@ def get_clusters(user):
           'server_host': cluster_config[i].SERVER_HOST.get()
         }
       )
+    )
+
+  # Get traditional services in regular ini too
+  if not IS_MULTICLUSTER_ONLY.get():
+    clusters.append(
+      (CLUSTER_ID.get(), {
+        'id': CLUSTER_ID.get(),
+        'name': CLUSTER_ID.get(),
+        'type': 'direct',
+        'interface': 'all',
+        'server_host': 'all'
+        }
       )
-    elif not IS_MULTICLUSTER_ONLY.get() or i == 'Default':
-      # Get core standalone config if there
-      clusters.append(
-        (CLUSTER_ID.get(), {
-          'id': CLUSTER_ID.get(),
-          'name': CLUSTER_ID.get(),
-          'type': 'direct',
-          'interface': 'all',
-          'server_host': 'all'
-          }
-        )
-      )
+    )
 
   return OrderedDict(clusters)