]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Delete useless and wrong comments in NEC Plugin
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Tue, 6 Aug 2013 05:07:07 +0000 (14:07 +0900)
committerRyota MIBU <r-mibu@cq.jp.nec.com>
Tue, 6 Aug 2013 07:59:04 +0000 (16:59 +0900)
This commit deletes useless and wrong comments in NEC Plugin, and adds
_clean_nec_ini() to Cleanup to make sure it is called.

Fixes: bug #1208716
Change-Id: I5c7950617cdf5d66f5f5cf3334bf2d5e617148eb

neutron/plugins/nec/nec_plugin.py
neutron/tests/unit/nec/test_nec_plugin.py

index 7f9b97c979cc9fd0e136db3897622e936c47496e..ac7a8cc1c417148142a3744aa3ae299120fb4f55 100644 (file)
@@ -230,8 +230,6 @@ class NECPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
 
         return port
 
-    # Quantm Plugin Basic methods
-
     def create_network(self, context, network):
         """Create a new network entry on DB, and create it on OFC."""
         LOG.debug(_("NECPluginV2.create_network() called, "
index bab4f3d33781646b0eb0f6bcd7dcb5071b0701dc..480ec1b312682f82ce1d31af8f7edc0bc3d37be2 100644 (file)
@@ -78,12 +78,8 @@ class NecPluginV2TestCase(test_plugin.NeutronDbPluginV2TestCase):
         self.addCleanup(mock.patch.stopall)
 
         self._set_nec_ini()
+        self.addCleanup(self._clean_nec_ini)
         super(NecPluginV2TestCase, self).setUp(self._plugin_name)
-        # NOTE: `test_config' is global, and most tests don't set
-        # test_config['config_files'] but read this in setUp().
-        # So clean test_config['config_files'] ASAP, to avoid side effects
-        # on other tests which are running at the same time.
-        self._clean_nec_ini()
 
         self.plugin = manager.NeutronManager.get_plugin()
         self.plugin.ofc = fake_ofc_manager.patch_ofc_manager()