Browse Source

murano_glance_artifacts_plugin backward compatibility

murano_glance_artifacts_plugin was moved from additional
components to murano settings in mitaka. Thus, need to
add backward copmatibility for old environments after
upgrade.

Change-Id: I46e04d5952c128572fd79818b833daee8911389f
Closes-Bug: #1595821
Artur Svechnikov 2 years ago
parent
commit
99050bb609
1 changed files with 10 additions and 4 deletions
  1. 10
    4
      fuel_plugin/ostf_adapter/mixins.py

+ 10
- 4
fuel_plugin/ostf_adapter/mixins.py View File

@@ -241,12 +241,18 @@ def _get_cluster_attrs(cluster_id, token=None):
241 241
         processor(comp)
242 242
 
243 243
     # TODO(freerunner): Rework murano part after removal murano from the box
244
-    murano_settings = response['editable'].get('murano_settings', None)
244
+    murano_settings = response['editable'].get('murano_settings', {})
245
+    # murano_glance_artifacts_plugin was moved from additional components
246
+    # in mitaka, thus for old environments it should taken from them
247
+    murano_glance_artifacts_plugin = murano_settings.get(
248
+        'murano_glance_artifacts_plugin',
249
+        additional_components.get('murano_glance_artifacts_plugin')
250
+    )
245 251
     # NOTE(freerunner): Murano settings appears only if murano enabled
246 252
     murano_artifacts = None
247
-    if murano_settings:
248
-        murano_artifacts = (murano_settings
249
-                            ['murano_glance_artifacts_plugin']['value'])
253
+    if murano_glance_artifacts_plugin:
254
+        murano_artifacts = murano_glance_artifacts_plugin['value']
255
+
250 256
     detach_murano = response['editable'].get('detach-murano', None)
251 257
     murano_plugin_enabled = None
252 258
     if detach_murano:

Loading…
Cancel
Save