From: Gal Sagie Date: Thu, 28 May 2015 06:17:15 +0000 (+0300) Subject: Addressing follow up comments for OVS_LIB fail_mode setting API X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=714c311871333c19c4d6203f79a948b184bf11cf;p=openstack-build%2Fneutron-build.git Addressing follow up comments for OVS_LIB fail_mode setting API 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 --- diff --git a/neutron/agent/common/ovs_lib.py b/neutron/agent/common/ovs_lib.py index 933ab6779..b316584f9 100644 --- a/neutron/agent/common/ovs_lib.py +++ b/neutron/agent/common/ovs_lib.py @@ -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,