From 62bc734ad540cde0cf47b863db686b328d575d33 Mon Sep 17 00:00:00 2001 From: Dan Sneddon Date: Fri, 28 Aug 2015 00:22:27 -0700 Subject: Add support for Linux Bonding to os-net-config ifcfg This change adds support for Linux Bonding to the impl_ifcfg in os-net-config. This change adds support for configuring Linux Bonds using the Bonding module rather than Open vSwitch. Most of the options for Linux Bonds are the same as OVS, with the exception of bonding_options instead of ovs_options. Change-Id: If8c6de1554234277843de9fac58536dd5b0a941b --- os_net_config/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'os_net_config/__init__.py') diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py index 8c9b70d..489b27a 100644 --- a/os_net_config/__init__.py +++ b/os_net_config/__init__.py @@ -56,6 +56,10 @@ class NetConfig(object): self.add_bond(obj) for member in obj.members: self.add_object(member) + elif isinstance(obj, objects.LinuxBond): + self.add_linux_bond(obj) + for member in obj.members: + self.add_object(member) def add_interface(self, interface): """Add an Interface object to the net config object. @@ -85,6 +89,13 @@ class NetConfig(object): """ raise NotImplemented("add_bond is not implemented.") + def add_linux_bond(self, bond): + """Add a LinuxBond object to the net config object. + + :param bridge: The LinuxBond object to add. + """ + raise NotImplemented("add_linuxbond is not implemented.") + def apply(self, cleanup=False): """Apply the network configuration. -- cgit 1.2.3-korg