Exemple #1
0
 def test_get_child_deep(self):
     hier = HConfig(host=self.host_a)
     interface = hier.add_child('interface Vlan2')
     interface.add_child('ip address 192.168.1.1 255.255.255.0')
     child = hier.get_child_deep([('equals', 'interface Vlan2'),
                                  ('equals',
                                   'ip address 192.168.1.1 255.255.255.0')])
     self.assertIsNotNone(child)
Exemple #2
0
 def test_get_child_deep(self):
     hier = HConfig(host=self.host_a)
     interface = hier.add_child("interface Vlan2")
     interface.add_child("ip address 192.168.1.1 255.255.255.0")
     child = hier.get_child_deep(
         [
             ("equals", "interface Vlan2"),
             ("equals", "ip address 192.168.1.1 255.255.255.0"),
         ]
     )
     assert child is not None