From 7ce531d3c099e310c81f94328b9bfa20de58699b Mon Sep 17 00:00:00 2001 From: Dan Sneddon Date: Mon, 8 Jun 2015 13:52:54 -0700 Subject: Set primary interface on OVS bonds This change sets one of the member interfaces of a bond as the primary interface, which results in that interface being the active slave. This change adds a step to the apply method in impl_ifcfg which runs 'ovs-appctl bond/set-active-slave ' after bringing up the bond interfaces. This step ensures that the bonds work correctly without LACP switch support. If a member interface on the bond is set as primary, that interface will be used. Co-Authored-By: Dan Prince Change-Id: I795bb3b8ef977f9276bfec062b197c473393942e --- os_net_config/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'os_net_config/__init__.py') diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py index e1bee26..c33e5d1 100644 --- a/os_net_config/__init__.py +++ b/os_net_config/__init__.py @@ -139,3 +139,7 @@ class NetConfig(object): 'link', 'set', 'dev', oldname, 'name', newname) self.execute(msg, '/sbin/ip', 'link', 'set', 'dev', newname, 'up') + + def ovs_appctl(self, action, *parameters): + msg = 'Running ovs-appctl %s %s' % (action, parameters) + self.execute(msg, '/bin/ovs-appctl', action, *parameters) -- cgit 1.2.3-korg