diff options
Diffstat (limited to 'os_net_config/tests/test_impl_ifcfg.py')
-rw-r--r-- | os_net_config/tests/test_impl_ifcfg.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py index f8864c4..cb2e881 100644 --- a/os_net_config/tests/test_impl_ifcfg.py +++ b/os_net_config/tests/test_impl_ifcfg.py @@ -146,6 +146,15 @@ BOND_IFACES="em1 em2" """ +_LINUX_BOND_DHCP = """# This file is autogenerated by os-net-config +DEVICE=bond0 +ONBOOT=yes +HOTPLUG=no +NM_CONTROLLED=no +BOOTPROTO=dhcp +""" + + class TestIfcfgNetConfig(base.TestCase): def setUp(self): @@ -321,6 +330,15 @@ BOOTPROTO=none self.assertEqual(_OVS_BOND_DHCP, self.get_interface_config('bond0')) + def test_linux_bond(self): + interface1 = objects.Interface('em1') + interface2 = objects.Interface('em2') + bond = objects.LinuxBond('bond0', use_dhcp=True, + members=[interface1, interface2]) + self.provider.add_linux_bond(bond) + self.assertEqual(_LINUX_BOND_DHCP, + self.get_interface_config('bond0')) + def test_interface_defroute(self): interface1 = objects.Interface('em1') interface2 = objects.Interface('em2', defroute=False) |