Exemple #1
0
    def test_rebuild_children_dict(self):
        hier1 = HConfig(host=self.host_a)
        interface = hier1.add_child("interface Vlan2")
        interface.add_children(
            ["description switch-mgmt-192.168.1.0/24", "ip address 192.168.1.0/24"]
        )
        delta_a = hier1
        hier1.rebuild_children_dict()
        delta_b = hier1

        assert list(delta_a.all_children()) == list(delta_b.all_children())
Exemple #2
0
    def test_rebuild_children_dict(self):
        hier1 = HConfig(host=self.host_a)
        interface = hier1.add_child('interface Vlan2')
        interface.add_children([
            'description switch-mgmt-192.168.1.0/24',
            'ip address 192.168.1.0/24'
        ])
        delta_a = hier1
        hier1.rebuild_children_dict()
        delta_b = hier1

        self.assertEqual(list(delta_a.all_children()),
                         list(delta_b.all_children()))