aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/__init__.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-10-12 07:57:35 +0000
committerGerrit Code Review <review@openstack.org>2015-10-12 07:57:35 +0000
commitcf68668803886fb68b0f0a4a33edf65cf17c6b7c (patch)
tree3415170b00d922626b110b57bde0f597076dc11b /os_net_config/__init__.py
parent95a8412bd9a80ce1e15363ae6c1a51db9432f9d7 (diff)
parent62bc734ad540cde0cf47b863db686b328d575d33 (diff)
Merge "Add support for Linux Bonding to os-net-config ifcfg"
Diffstat (limited to 'os_net_config/__init__.py')
-rw-r--r--os_net_config/__init__.py11
1 files changed, 11 insertions, 0 deletions
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.