]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Addressing follow up comments for OVS_LIB fail_mode setting API
authorGal Sagie <gal.sagie@huawei.com>
Thu, 28 May 2015 06:17:15 +0000 (09:17 +0300)
committerGal Sagie <gal.sagie@huawei.com>
Thu, 28 May 2015 06:17:15 +0000 (09:17 +0300)
Review https://review.openstack.org/#/c/185659/ got merged before i could
see and address the last comment.
This is a follow up patch to address that change

Change-Id: I19135a75cf25e03d6c1f89d7c18e8da3af2ec643

neutron/agent/common/ovs_lib.py

index 933ab67796c5eb103d9adc807f8240d19fa6006b..b316584f9eb19f337df9715d858f0a720bdd86e5 100644 (file)
@@ -157,13 +157,14 @@ class OVSBridge(BaseOVS):
         return self.ovsdb.get_controller(self.br_name).execute(
             check_error=True)
 
+    def _set_bridge_fail_mode(self, mode):
+        self.ovsdb.set_fail_mode(self.br_name, mode).execute(check_error=True)
+
     def set_secure_mode(self):
-        self.ovsdb.set_fail_mode(self.br_name, FAILMODE_SECURE).execute(
-            check_error=True)
+        self._set_bridge_fail_mode(FAILMODE_SECURE)
 
     def set_standalone_mode(self):
-        self.ovsdb.set_fail_mode(self.br_name, FAILMODE_STANDALONE).execute(
-            check_error=True)
+        self._set_bridge_fail_mode(FAILMODE_STANDALONE)
 
     def set_protocols(self, protocols):
         self.set_db_attribute('Bridge', self.br_name, 'protocols', protocols,