From 714c311871333c19c4d6203f79a948b184bf11cf Mon Sep 17 00:00:00 2001 From: Gal Sagie Date: Thu, 28 May 2015 09:17:15 +0300 Subject: [PATCH] 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 --- neutron/agent/common/ovs_lib.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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, -- 2.45.2