diff options
Diffstat (limited to 'os_net_config')
-rw-r--r-- | os_net_config/impl_ifcfg.py | 2 | ||||
-rw-r--r-- | os_net_config/tests/test_impl_ifcfg.py | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py index 99273bc..4cacbf8 100644 --- a/os_net_config/impl_ifcfg.py +++ b/os_net_config/impl_ifcfg.py @@ -62,7 +62,7 @@ class IfcfgNetConfig(os_net_config.NetConfig): children.add(member) children.update(self.child_members(member)) except KeyError: - children.add(name) + pass return children def _add_common(self, base_opt): diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py index e32aff2..3a77ee9 100644 --- a/os_net_config/tests/test_impl_ifcfg.py +++ b/os_net_config/tests/test_impl_ifcfg.py @@ -489,6 +489,15 @@ class TestIfcfgNetConfigApply(base.TestCase): self.assertIn('em1', self.ifup_interface_names) self.assertIn('em2', self.ifup_interface_names) + def test_restart_interface_counts(self): + interface = objects.Interface('em1') + self.provider.add_interface(interface) + interface2 = objects.Interface('em2') + self.provider.add_interface(interface2) + self.provider.apply() + self.assertEqual(1, self.ifup_interface_names.count("em1")) + self.assertEqual(1, self.ifup_interface_names.count("em2")) + def test_vlan_apply(self): vlan = objects.Vlan('em1', 5) self.provider.add_vlan(vlan) |