def find_interface(device, name):
     for i in xmlutils.iterDescendantsWithAttribute(device, 'interface',
                                                    'name', name):
         return i
     return None
Exemple #2
0
 def find_interface(device, name):
     for i in xmlutils.iterDescendantsWithAttribute(device, 'interface',
                                                    'name', name):
         return i
     return None
 def find_device(scenario, name):
     tagName = ('device', 'host', 'router')
     for d in xmlutils.iterDescendantsWithAttribute(scenario, tagName,
                                                    'name', name):
         return d
     return None
Exemple #4
0
 def find_device(scenario, name):
     tagName = ('device', 'host', 'router')
     for d in xmlutils.iterDescendantsWithAttribute(scenario, tagName,
                                                    'name', name):
         return d
     return None