aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/__init__.py
diff options
context:
space:
mode:
authorDan Sneddon <dsneddon@redhat.com>2015-06-08 13:52:54 -0700
committerDan Prince <dprince@redhat.com>2015-06-09 12:33:32 -0400
commit7ce531d3c099e310c81f94328b9bfa20de58699b (patch)
tree403316dd351650dcbd90600e992159a71f9c012c /os_net_config/__init__.py
parenta4a4c43f92138b7d477c7c944849fc69e3c21ac6 (diff)
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 <bond> <iface>' 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 <dprince@redhat.com> Change-Id: I795bb3b8ef977f9276bfec062b197c473393942e
Diffstat (limited to 'os_net_config/__init__.py')
-rw-r--r--os_net_config/__init__.py4
1 files changed, 4 insertions, 0 deletions
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)