Browse code

Fix is_neutron_legacy_enabled function

This function will now first filter out all "neutron-" strings from
DISABLED_SERVICES list before looking for "neutron" string in it.

Change-Id: I5cab6a3be553713e1257599fb72042c6001f2672
Close-Bug: #1824884

Slawek Kaplonski authored on 2019/04/16 06:54:31
Showing 1 changed files
... ...
@@ -117,7 +117,9 @@ function is_neutron_enabled {
117 117
 # Test if any Neutron services are enabled
118 118
 # is_neutron_enabled
119 119
 function is_neutron_legacy_enabled {
120
-    [[ ,${DISABLED_SERVICES} =~ ,"neutron" ]] && return 1
120
+    # first we need to remove all "neutron-" from DISABLED_SERVICES list
121
+    disabled_services_copy=$(echo $DISABLED_SERVICES | sed 's/neutron-//g')
122
+    [[ ,${disabled_services_copy} =~ ,"neutron" ]] && return 1
121 123
     [[ ,${ENABLED_SERVICES} =~ ,"q-" ]] && return 0
122 124
     return 1
123 125
 }