We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
neutron plugin does not have check_enabled
The neutron plugin is runs on non-OpenStack systems, because it has no check_enabled method like the other openstack plugins.

I'm happy to help (say the word), but this plugin only has the one commit and I'm not sure what it's status is.

Also, it gets the following exception because it is running (which it shouldn't) and it is assuming that network namespaces are enabled.

```
Traceback (most recent call last):
  File "/opt/sosreport/embedded/lib/python2.7/site-packages/sos/sosreport.py", line 940, in setup
    plug.setup()
  File "/opt/sosreport/embedded/lib/python2.7/site-packages/sos/plugins/neutron.py", line 170, in setup
    super(RedHatNeutron, self).setup()
  File "/opt/sosreport/embedded/lib/python2.7/site-packages/sos/plugins/neutron.py", line 49, in setup
    self.netns_dumps()
  File "/opt/sosreport/embedded/lib/python2.7/site-packages/sos/plugins/neutron.py", line 80, in netns_dumps
    prefix, netid = nsname.split('-', 1)
ValueError: need more than 1 value to unpack
```

```
# ip netns
Object "netns" is unknown, try "ip help".
# cat /etc/redhat-release 
CentOS release 6.3 (Final)
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sos/plugins/neutron.py`
Content:
```
1 ## Copyright (C) 2013 Red Hat, Inc., Brent Eagles <beagles@redhat.com>
2 
3 ### This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2 of the License, or
6 ## (at your option) any later version.
7 
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 ## GNU General Public License for more details.
12 
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program; if not, write to the Free Software
15 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 
17 import os
18 import re
19 
20 from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
21 
22 # The Networking plugin includes most of what is needed from a snapshot
23 # of the networking, so we only need to focus on the parts that are specific
24 # to OpenStack Networking. The Process plugin should capture the dnsmasq
25 # command line. The libvirt plugin grabs the instance's XML definition which
26 # has the interface names for an instance. So what remains is relevant database
27 # info...
28 
29 class Neutron(Plugin):
30     """OpenStack Networking (quantum/neutron) related information
31     """
32     plugin_name = "neutron"
33 
34     option_list = [("log", "Gathers all Neutron logs", "slow", False),
35                    ("quantum", "Overrides checks for newer Neutron components",
36                     "fast", False)]
37 
38     component_name = "neutron"
39 
40     def setup(self):
41         if os.path.exists("/etc/neutron/") and self.get_option("quantum", False):
42             self.component_name = self.plugin_name
43         else:
44             self.component_name = "quantum"
45 
46         self.add_copy_specs(["/etc/%s/" % self.component_name,
47                              "/var/log/%s/" % self.component_name])
48 
49         self.netns_dumps()
50         self.get_ovs_dumps()
51 
52 
53     def get_ovs_dumps(self):
54         # Check to see if we are using the Open vSwitch plugin. If not we 
55         # should be able to skip the rest of the dump.
56         ovs_conf_check_out = self.call_ext_prog('grep "^core_plugin.*openvswitch" ' +
57             ("/etc/%s/*.conf" + self.component_name))
58 
59         if not ovs_conf_check_out or len(ovs_conf_check_out[1].splitlines()) == 0:
60             return
61 
62         # The '-s' option enables dumping of packet counters on the
63         # ports.
64         self.add_cmd_output("ovs-dpctl -s show")
65 
66         # The '-t 5' adds an upper bound on how long to wait to connect
67         # to the Open vSwitch server, avoiding hangs when running sosreport.
68         self.add_cmd_output("ovs-vsctl -t 5 show")
69 
70     def netns_dumps(self):
71         # It would've been beautiful if we could get parts of the networking
72         # plugin to run in different namespaces. There are a couple of options
73         # in the short term: create a local instance and "borrow" some of the
74         # functionality, or simply copy some of the functionality.
75         prefixes = ["qdhcp", "qrouter"]
76         nslist = self.call_ext_prog("ip netns")
77         lease_directories = []
78         if nslist:
79             for nsname in nslist[1].splitlines():
80                 prefix, netid = nsname.split('-', 1)
81                 if len(netid) > 0 and prefix in prefixes:
82                     self.ns_gather_data(nsname)
83                     lease_directories.append("/var/lib/%s/dhcp/%s/" %
84                         (self.component_name, netid))
85             self.add_copy_specs(lease_directories)
86 
87     # TODO: Refactor! Copied from Networking plugin.
88     def get_interface_name(self,ip_addr_out):
89         """Return a dictionary for which key are interface name according to the
90         output of ifconifg-a stored in ifconfig_file.
91         """
92         out={}
93         for line in ip_addr_out[1].splitlines():
94             match=re.match('.*link/ether', line)
95             if match:
96                 int=match.string.split(':')[1].lstrip()
97                 out[int]=True
98         return out
99         
100     def ns_gather_data(self, nsname):
101         cmd_prefix = "ip netns exec %s " % nsname
102         self.add_cmd_output(cmd_prefix + "iptables-save")
103         self.add_cmd_output(cmd_prefix + "ifconfig -a")
104         self.add_cmd_output(cmd_prefix + "route -n")
105         # borrowed from networking plugin
106         ip_addr_out=self.call_ext_prog(cmd_prefix + "ip -o addr")
107         if ip_addr_out:
108             for eth in self.get_interface_name(ip_addr_out):
109                 self.add_cmd_output(cmd_prefix + "ethtool "+eth)
110                 self.add_cmd_output(cmd_prefix + "ethtool -i "+eth)
111                 self.add_cmd_output(cmd_prefix + "ethtool -k "+eth)
112                 self.add_cmd_output(cmd_prefix + "ethtool -S "+eth)
113                 # Most, if not all, IFs in the namespaces are going to be 
114                 # virtual. The '-a', '-c' and '-g' options are not likely to be
115                 # supported so these ops are not copied from the network
116                 # plugin.
117 
118         # As all of the bridges are in the "global namespace", we do not need
119         # to gather info on them.
120 
121     def gen_pkg_tuple(self, packages):
122         names = []
123         for p in packages:
124             names.append(p % { "comp" : self.component_name })
125         return tuple(names)
126 
127 class DebianNeutron(Neutron, DebianPlugin, UbuntuPlugin):
128     """OpenStack Neutron related information for Debian based distributions
129     """
130     package_list_template = ['%(comp)s-common',
131                             '%(comp)s-plugin-cisco',
132                             '%(comp)s-plugin-linuxbridge-agent',
133                             '%(comp)s-plugin-nicira',
134                             '%(comp)s-plugin-openvswitch',
135                             '%(comp)s-plugin-openvswitch-agent',
136                             '%(comp)s-plugin-ryu',
137                             '%(comp)s-plugin-ryu-agent',
138                             '%(comp)s-server',
139                             'python-%(comp)s',
140                             'python-%(comp)sclient']
141 
142     def setup(self):
143         super(DebianNeutron, self).setup()
144         self.packages = self.gen_pkg_tuple(self.package_list_template)
145         self.add_copy_spec("/etc/sudoers.d/%s_sudoers" % self.component_name)
146 
147 
148 
149 class RedHatNeutron(Neutron, RedHatPlugin):
150     """OpenStack Neutron related information for Red Hat distributions
151     """
152 
153     package_list_template = ['openstack-%(comp)s', 
154                              'openstack-%(comp)s-linuxbridge'
155                              'openstack-%(comp)s-metaplugin',
156                              'openstack-%(comp)s-openvswitch',
157                              'openstack-%(comp)s-bigswitch',
158                              'openstack-%(comp)s-brocade',
159                              'openstack-%(comp)s-cisco',
160                              'openstack-%(comp)s-hyperv',
161                              'openstack-%(comp)s-midonet',
162                              'openstack-%(comp)s-nec'
163                              'openstack-%(comp)s-nicira',
164                              'openstack-%(comp)s-plumgrid',
165                              'openstack-%(comp)s-ryu',
166                              'python-%(comp)s',
167                              'python-%(comp)sclient']
168 
169     def setup(self):
170         super(RedHatNeutron, self).setup()
171         self.packages = self.gen_pkg_tuple(self.package_list_template)
172         self.add_copy_specs(["/etc/sudoers.d/%s-rootwrap" % self.component_name])
173
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sos/plugins/neutron.py b/sos/plugins/neutron.py
--- a/sos/plugins/neutron.py
+++ b/sos/plugins/neutron.py
@@ -139,6 +139,9 @@
                             'python-%(comp)s',
                             'python-%(comp)sclient']
 
+    def check_enabled(self):
+        return self.is_installed("%s-common" % self.component_name)
+
     def setup(self):
         super(DebianNeutron, self).setup()
         self.packages = self.gen_pkg_tuple(self.package_list_template)
@@ -166,6 +169,9 @@
                              'python-%(comp)s',
                              'python-%(comp)sclient']
 
+    def check_enabled(self):
+        return self.is_installed("openstack-%s" % self.component_name)
+
     def setup(self):
         super(RedHatNeutron, self).setup()
         self.packages = self.gen_pkg_tuple(self.package_list_template)

{"golden_diff": "diff --git a/sos/plugins/neutron.py b/sos/plugins/neutron.py\n--- a/sos/plugins/neutron.py\n+++ b/sos/plugins/neutron.py\n@@ -139,6 +139,9 @@\n                             'python-%(comp)s',\n                             'python-%(comp)sclient']\n \n+    def check_enabled(self):\n+        return self.is_installed(\"%s-common\" % self.component_name)\n+\n     def setup(self):\n         super(DebianNeutron, self).setup()\n         self.packages = self.gen_pkg_tuple(self.package_list_template)\n@@ -166,6 +169,9 @@\n                              'python-%(comp)s',\n                              'python-%(comp)sclient']\n \n+    def check_enabled(self):\n+        return self.is_installed(\"openstack-%s\" % self.component_name)\n+\n     def setup(self):\n         super(RedHatNeutron, self).setup()\n         self.packages = self.gen_pkg_tuple(self.package_list_template)\n", "issue": "neutron plugin does not have check_enabled\nThe neutron plugin is runs on non-OpenStack systems, because it has no check_enabled method like the other openstack plugins.\n\nI'm happy to help (say the word), but this plugin only has the one commit and I'm not sure what it's status is.\n\nAlso, it gets the following exception because it is running (which it shouldn't) and it is assuming that network namespaces are enabled.\n\n```\nTraceback (most recent call last):\n  File \"/opt/sosreport/embedded/lib/python2.7/site-packages/sos/sosreport.py\", line 940, in setup\n    plug.setup()\n  File \"/opt/sosreport/embedded/lib/python2.7/site-packages/sos/plugins/neutron.py\", line 170, in setup\n    super(RedHatNeutron, self).setup()\n  File \"/opt/sosreport/embedded/lib/python2.7/site-packages/sos/plugins/neutron.py\", line 49, in setup\n    self.netns_dumps()\n  File \"/opt/sosreport/embedded/lib/python2.7/site-packages/sos/plugins/neutron.py\", line 80, in netns_dumps\n    prefix, netid = nsname.split('-', 1)\nValueError: need more than 1 value to unpack\n```\n\n```\n# ip netns\nObject \"netns\" is unknown, try \"ip help\".\n# cat /etc/redhat-release \nCentOS release 6.3 (Final)\n```\n\n", "before_files": [{"content": "## Copyright (C) 2013 Red Hat, Inc., Brent Eagles <beagles@redhat.com>\n\n### This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your option) any later version.\n\n## This program is distributed in the hope that it will be useful,\n## but WITHOUT ANY WARRANTY; without even the implied warranty of\n## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n## GNU General Public License for more details.\n\n## You should have received a copy of the GNU General Public License\n## along with this program; if not, write to the Free Software\n## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\nimport os\nimport re\n\nfrom sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin\n\n# The Networking plugin includes most of what is needed from a snapshot\n# of the networking, so we only need to focus on the parts that are specific\n# to OpenStack Networking. The Process plugin should capture the dnsmasq\n# command line. The libvirt plugin grabs the instance's XML definition which\n# has the interface names for an instance. So what remains is relevant database\n# info...\n\nclass Neutron(Plugin):\n    \"\"\"OpenStack Networking (quantum/neutron) related information\n    \"\"\"\n    plugin_name = \"neutron\"\n\n    option_list = [(\"log\", \"Gathers all Neutron logs\", \"slow\", False),\n                   (\"quantum\", \"Overrides checks for newer Neutron components\",\n                    \"fast\", False)]\n\n    component_name = \"neutron\"\n\n    def setup(self):\n        if os.path.exists(\"/etc/neutron/\") and self.get_option(\"quantum\", False):\n            self.component_name = self.plugin_name\n        else:\n            self.component_name = \"quantum\"\n\n        self.add_copy_specs([\"/etc/%s/\" % self.component_name,\n                             \"/var/log/%s/\" % self.component_name])\n\n        self.netns_dumps()\n        self.get_ovs_dumps()\n\n\n    def get_ovs_dumps(self):\n        # Check to see if we are using the Open vSwitch plugin. If not we \n        # should be able to skip the rest of the dump.\n        ovs_conf_check_out = self.call_ext_prog('grep \"^core_plugin.*openvswitch\" ' +\n            (\"/etc/%s/*.conf\" + self.component_name))\n\n        if not ovs_conf_check_out or len(ovs_conf_check_out[1].splitlines()) == 0:\n            return\n\n        # The '-s' option enables dumping of packet counters on the\n        # ports.\n        self.add_cmd_output(\"ovs-dpctl -s show\")\n\n        # The '-t 5' adds an upper bound on how long to wait to connect\n        # to the Open vSwitch server, avoiding hangs when running sosreport.\n        self.add_cmd_output(\"ovs-vsctl -t 5 show\")\n\n    def netns_dumps(self):\n        # It would've been beautiful if we could get parts of the networking\n        # plugin to run in different namespaces. There are a couple of options\n        # in the short term: create a local instance and \"borrow\" some of the\n        # functionality, or simply copy some of the functionality.\n        prefixes = [\"qdhcp\", \"qrouter\"]\n        nslist = self.call_ext_prog(\"ip netns\")\n        lease_directories = []\n        if nslist:\n            for nsname in nslist[1].splitlines():\n                prefix, netid = nsname.split('-', 1)\n                if len(netid) > 0 and prefix in prefixes:\n                    self.ns_gather_data(nsname)\n                    lease_directories.append(\"/var/lib/%s/dhcp/%s/\" %\n                        (self.component_name, netid))\n            self.add_copy_specs(lease_directories)\n\n    # TODO: Refactor! Copied from Networking plugin.\n    def get_interface_name(self,ip_addr_out):\n        \"\"\"Return a dictionary for which key are interface name according to the\n        output of ifconifg-a stored in ifconfig_file.\n        \"\"\"\n        out={}\n        for line in ip_addr_out[1].splitlines():\n            match=re.match('.*link/ether', line)\n            if match:\n                int=match.string.split(':')[1].lstrip()\n                out[int]=True\n        return out\n        \n    def ns_gather_data(self, nsname):\n        cmd_prefix = \"ip netns exec %s \" % nsname\n        self.add_cmd_output(cmd_prefix + \"iptables-save\")\n        self.add_cmd_output(cmd_prefix + \"ifconfig -a\")\n        self.add_cmd_output(cmd_prefix + \"route -n\")\n        # borrowed from networking plugin\n        ip_addr_out=self.call_ext_prog(cmd_prefix + \"ip -o addr\")\n        if ip_addr_out:\n            for eth in self.get_interface_name(ip_addr_out):\n                self.add_cmd_output(cmd_prefix + \"ethtool \"+eth)\n                self.add_cmd_output(cmd_prefix + \"ethtool -i \"+eth)\n                self.add_cmd_output(cmd_prefix + \"ethtool -k \"+eth)\n                self.add_cmd_output(cmd_prefix + \"ethtool -S \"+eth)\n                # Most, if not all, IFs in the namespaces are going to be \n                # virtual. The '-a', '-c' and '-g' options are not likely to be\n                # supported so these ops are not copied from the network\n                # plugin.\n\n        # As all of the bridges are in the \"global namespace\", we do not need\n        # to gather info on them.\n\n    def gen_pkg_tuple(self, packages):\n        names = []\n        for p in packages:\n            names.append(p % { \"comp\" : self.component_name })\n        return tuple(names)\n\nclass DebianNeutron(Neutron, DebianPlugin, UbuntuPlugin):\n    \"\"\"OpenStack Neutron related information for Debian based distributions\n    \"\"\"\n    package_list_template = ['%(comp)s-common',\n                            '%(comp)s-plugin-cisco',\n                            '%(comp)s-plugin-linuxbridge-agent',\n                            '%(comp)s-plugin-nicira',\n                            '%(comp)s-plugin-openvswitch',\n                            '%(comp)s-plugin-openvswitch-agent',\n                            '%(comp)s-plugin-ryu',\n                            '%(comp)s-plugin-ryu-agent',\n                            '%(comp)s-server',\n                            'python-%(comp)s',\n                            'python-%(comp)sclient']\n\n    def setup(self):\n        super(DebianNeutron, self).setup()\n        self.packages = self.gen_pkg_tuple(self.package_list_template)\n        self.add_copy_spec(\"/etc/sudoers.d/%s_sudoers\" % self.component_name)\n\n\n\nclass RedHatNeutron(Neutron, RedHatPlugin):\n    \"\"\"OpenStack Neutron related information for Red Hat distributions\n    \"\"\"\n\n    package_list_template = ['openstack-%(comp)s', \n                             'openstack-%(comp)s-linuxbridge'\n                             'openstack-%(comp)s-metaplugin',\n                             'openstack-%(comp)s-openvswitch',\n                             'openstack-%(comp)s-bigswitch',\n                             'openstack-%(comp)s-brocade',\n                             'openstack-%(comp)s-cisco',\n                             'openstack-%(comp)s-hyperv',\n                             'openstack-%(comp)s-midonet',\n                             'openstack-%(comp)s-nec'\n                             'openstack-%(comp)s-nicira',\n                             'openstack-%(comp)s-plumgrid',\n                             'openstack-%(comp)s-ryu',\n                             'python-%(comp)s',\n                             'python-%(comp)sclient']\n\n    def setup(self):\n        super(RedHatNeutron, self).setup()\n        self.packages = self.gen_pkg_tuple(self.package_list_template)\n        self.add_copy_specs([\"/etc/sudoers.d/%s-rootwrap\" % self.component_name])\n", "path": "sos/plugins/neutron.py"}], "after_files": [{"content": "## Copyright (C) 2013 Red Hat, Inc., Brent Eagles <beagles@redhat.com>\n\n### This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your option) any later version.\n\n## This program is distributed in the hope that it will be useful,\n## but WITHOUT ANY WARRANTY; without even the implied warranty of\n## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n## GNU General Public License for more details.\n\n## You should have received a copy of the GNU General Public License\n## along with this program; if not, write to the Free Software\n## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\nimport os\nimport re\n\nfrom sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin\n\n# The Networking plugin includes most of what is needed from a snapshot\n# of the networking, so we only need to focus on the parts that are specific\n# to OpenStack Networking. The Process plugin should capture the dnsmasq\n# command line. The libvirt plugin grabs the instance's XML definition which\n# has the interface names for an instance. So what remains is relevant database\n# info...\n\nclass Neutron(Plugin):\n    \"\"\"OpenStack Networking (quantum/neutron) related information\n    \"\"\"\n    plugin_name = \"neutron\"\n\n    option_list = [(\"log\", \"Gathers all Neutron logs\", \"slow\", False),\n                   (\"quantum\", \"Overrides checks for newer Neutron components\",\n                    \"fast\", False)]\n\n    component_name = \"neutron\"\n\n    def setup(self):\n        if os.path.exists(\"/etc/neutron/\") and self.get_option(\"quantum\", False):\n            self.component_name = self.plugin_name\n        else:\n            self.component_name = \"quantum\"\n\n        self.add_copy_specs([\"/etc/%s/\" % self.component_name,\n                             \"/var/log/%s/\" % self.component_name])\n\n        self.netns_dumps()\n        self.get_ovs_dumps()\n\n\n    def get_ovs_dumps(self):\n        # Check to see if we are using the Open vSwitch plugin. If not we \n        # should be able to skip the rest of the dump.\n        ovs_conf_check_out = self.call_ext_prog('grep \"^core_plugin.*openvswitch\" ' +\n            (\"/etc/%s/*.conf\" + self.component_name))\n\n        if not ovs_conf_check_out or len(ovs_conf_check_out[1].splitlines()) == 0:\n            return\n\n        # The '-s' option enables dumping of packet counters on the\n        # ports.\n        self.add_cmd_output(\"ovs-dpctl -s show\")\n\n        # The '-t 5' adds an upper bound on how long to wait to connect\n        # to the Open vSwitch server, avoiding hangs when running sosreport.\n        self.add_cmd_output(\"ovs-vsctl -t 5 show\")\n\n    def netns_dumps(self):\n        # It would've been beautiful if we could get parts of the networking\n        # plugin to run in different namespaces. There are a couple of options\n        # in the short term: create a local instance and \"borrow\" some of the\n        # functionality, or simply copy some of the functionality.\n        prefixes = [\"qdhcp\", \"qrouter\"]\n        nslist = self.call_ext_prog(\"ip netns\")\n        lease_directories = []\n        if nslist:\n            for nsname in nslist[1].splitlines():\n                prefix, netid = nsname.split('-', 1)\n                if len(netid) > 0 and prefix in prefixes:\n                    self.ns_gather_data(nsname)\n                    lease_directories.append(\"/var/lib/%s/dhcp/%s/\" %\n                        (self.component_name, netid))\n            self.add_copy_specs(lease_directories)\n\n    # TODO: Refactor! Copied from Networking plugin.\n    def get_interface_name(self,ip_addr_out):\n        \"\"\"Return a dictionary for which key are interface name according to the\n        output of ifconifg-a stored in ifconfig_file.\n        \"\"\"\n        out={}\n        for line in ip_addr_out[1].splitlines():\n            match=re.match('.*link/ether', line)\n            if match:\n                int=match.string.split(':')[1].lstrip()\n                out[int]=True\n        return out\n        \n    def ns_gather_data(self, nsname):\n        cmd_prefix = \"ip netns exec %s \" % nsname\n        self.add_cmd_output(cmd_prefix + \"iptables-save\")\n        self.add_cmd_output(cmd_prefix + \"ifconfig -a\")\n        self.add_cmd_output(cmd_prefix + \"route -n\")\n        # borrowed from networking plugin\n        ip_addr_out=self.call_ext_prog(cmd_prefix + \"ip -o addr\")\n        if ip_addr_out:\n            for eth in self.get_interface_name(ip_addr_out):\n                self.add_cmd_output(cmd_prefix + \"ethtool \"+eth)\n                self.add_cmd_output(cmd_prefix + \"ethtool -i \"+eth)\n                self.add_cmd_output(cmd_prefix + \"ethtool -k \"+eth)\n                self.add_cmd_output(cmd_prefix + \"ethtool -S \"+eth)\n                # Most, if not all, IFs in the namespaces are going to be \n                # virtual. The '-a', '-c' and '-g' options are not likely to be\n                # supported so these ops are not copied from the network\n                # plugin.\n\n        # As all of the bridges are in the \"global namespace\", we do not need\n        # to gather info on them.\n\n    def gen_pkg_tuple(self, packages):\n        names = []\n        for p in packages:\n            names.append(p % { \"comp\" : self.component_name })\n        return tuple(names)\n\nclass DebianNeutron(Neutron, DebianPlugin, UbuntuPlugin):\n    \"\"\"OpenStack Neutron related information for Debian based distributions\n    \"\"\"\n    package_list_template = ['%(comp)s-common',\n                            '%(comp)s-plugin-cisco',\n                            '%(comp)s-plugin-linuxbridge-agent',\n                            '%(comp)s-plugin-nicira',\n                            '%(comp)s-plugin-openvswitch',\n                            '%(comp)s-plugin-openvswitch-agent',\n                            '%(comp)s-plugin-ryu',\n                            '%(comp)s-plugin-ryu-agent',\n                            '%(comp)s-server',\n                            'python-%(comp)s',\n                            'python-%(comp)sclient']\n\n    def check_enabled(self):\n        return self.is_installed(\"%s-common\" % self.component_name)\n\n    def setup(self):\n        super(DebianNeutron, self).setup()\n        self.packages = self.gen_pkg_tuple(self.package_list_template)\n        self.add_copy_spec(\"/etc/sudoers.d/%s_sudoers\" % self.component_name)\n\n\n\nclass RedHatNeutron(Neutron, RedHatPlugin):\n    \"\"\"OpenStack Neutron related information for Red Hat distributions\n    \"\"\"\n\n    package_list_template = ['openstack-%(comp)s', \n                             'openstack-%(comp)s-linuxbridge'\n                             'openstack-%(comp)s-metaplugin',\n                             'openstack-%(comp)s-openvswitch',\n                             'openstack-%(comp)s-bigswitch',\n                             'openstack-%(comp)s-brocade',\n                             'openstack-%(comp)s-cisco',\n                             'openstack-%(comp)s-hyperv',\n                             'openstack-%(comp)s-midonet',\n                             'openstack-%(comp)s-nec'\n                             'openstack-%(comp)s-nicira',\n                             'openstack-%(comp)s-plumgrid',\n                             'openstack-%(comp)s-ryu',\n                             'python-%(comp)s',\n                             'python-%(comp)sclient']\n\n    def check_enabled(self):\n        return self.is_installed(\"openstack-%s\" % self.component_name)\n\n    def setup(self):\n        super(RedHatNeutron, self).setup()\n        self.packages = self.gen_pkg_tuple(self.package_list_template)\n        self.add_copy_specs([\"/etc/sudoers.d/%s-rootwrap\" % self.component_name])\n", "path": "sos/plugins/neutron.py"}]}