diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-01-03 21:24:55 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-01-03 21:24:55 +0000 |
commit | d929214c7a904da57a406dd56ac06f001fdc7d7b (patch) | |
tree | ccaf54bc78ee4c3df18acd320a5121bb2104a616 /os_net_config/tests/test_impl_ifcfg.py | |
parent | d621022954195049c96b19064f2eddd46ec95fe4 (diff) | |
parent | 433a0f3cbe59fd5da183245bf7e6dcd4af4b8c88 (diff) |
Merge "Add support for enabling hotplug on interfaces"
Diffstat (limited to 'os_net_config/tests/test_impl_ifcfg.py')
-rw-r--r-- | os_net_config/tests/test_impl_ifcfg.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py index 3a5a7db..9621b8c 100644 --- a/os_net_config/tests/test_impl_ifcfg.py +++ b/os_net_config/tests/test_impl_ifcfg.py @@ -33,6 +33,15 @@ NM_CONTROLLED=no PEERDNS=no """ +_HOTPLUG = """# This file is autogenerated by os-net-config +DEVICE=em1 +ONBOOT=yes +HOTPLUG=yes +NM_CONTROLLED=no +PEERDNS=no +BOOTPROTO=none +""" + _NO_IP = _BASE_IFCFG + "BOOTPROTO=none\n" _V4_IFCFG = _BASE_IFCFG + """BOOTPROTO=static @@ -386,6 +395,11 @@ class TestIfcfgNetConfig(base.TestCase): self.provider.add_interface(interface) self.assertEqual(_NO_IP, self.get_interface_config()) + def test_add_interface_with_hotplug(self): + interface = objects.Interface('em1', hotplug=True) + self.provider.add_interface(interface) + self.assertEqual(_HOTPLUG, self.get_interface_config()) + def test_add_base_interface_vlan(self): interface = objects.Interface('em1.120') self.provider.add_interface(interface) |