Blame SOURCES/0039-openstack_neutron-fix-legacy-component-detection-tes.patch

0cd6dc
From 3f8c4b658c5d702bde59bdd98cb114ea0064eae9 Mon Sep 17 00:00:00 2001
0cd6dc
From: "Bryn M. Reeves" <bmr@redhat.com>
0cd6dc
Date: Thu, 9 Oct 2014 17:07:38 +0100
0cd6dc
Subject: [PATCH 39/93] [openstack_neutron] fix legacy component detection test
0cd6dc
0cd6dc
Currently the Neutron plugin will assume it's running on a Neutron
0cd6dc
(rather than a legacy Quantum) installation if:
0cd6dc
0cd6dc
  - '/etc/neutron' exists AND the user specifies quantum=True
0cd6dc
0cd6dc
Otherwise it's assumed to be a Quantum install. This is clearly
0cd6dc
broken; the sense of the 'openstack_neutron.quantum' part of the
0cd6dc
test should be inverted.
0cd6dc
0cd6dc
Fixes #420.
0cd6dc
0cd6dc
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
0cd6dc
---
0cd6dc
 sos/plugins/openstack_neutron.py | 5 +----
0cd6dc
 1 file changed, 1 insertion(+), 4 deletions(-)
0cd6dc
0cd6dc
diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py
0cd6dc
index dba192e..d37430e 100644
0cd6dc
--- a/sos/plugins/openstack_neutron.py
0cd6dc
+++ b/sos/plugins/openstack_neutron.py
0cd6dc
@@ -40,10 +40,7 @@ class Neutron(Plugin):
0cd6dc
     component_name = "neutron"
0cd6dc
 
0cd6dc
     def setup(self):
0cd6dc
-        if os.path.exists("/etc/neutron/") and \
0cd6dc
-                self.get_option("quantum", False):
0cd6dc
-            self.component_name = self.plugin_name
0cd6dc
-        else:
0cd6dc
+        if not os.path.exists("/etc/neutron/") or self.get_option("quantum"):
0cd6dc
             self.component_name = "quantum"
0cd6dc
 
0cd6dc
         self.add_copy_spec([
0cd6dc
-- 
0cd6dc
1.9.3
0cd6dc