From a9a51ca6382eb01c99fce51084f64a69f4c7d58a Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Mon, 15 Apr 2019 23:54:31 +0200 Subject: [PATCH] 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 --- lib/neutron | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index 1066d8e342..947c491ec1 100644 --- a/lib/neutron +++ b/lib/neutron @@ -117,7 +117,9 @@ function is_neutron_enabled { # Test if any Neutron services are enabled # is_neutron_enabled function is_neutron_legacy_enabled { - [[ ,${DISABLED_SERVICES} =~ ,"neutron" ]] && return 1 + # first we need to remove all "neutron-" from DISABLED_SERVICES list + disabled_services_copy=$(echo $DISABLED_SERVICES | sed 's/neutron-//g') + [[ ,${disabled_services_copy} =~ ,"neutron" ]] && return 1 [[ ,${ENABLED_SERVICES} =~ ,"q-" ]] && return 0 return 1 }