(ctx)
| 210 | return util.get_xml_path(net.XMLDesc(0), func=fixed) |
| 211 | |
| 212 | def networks(ctx): |
| 213 | result = [] |
| 214 | for net in ctx.xpathEval('/domain/devices/interface'): |
| 215 | mac_host = net.xpathEval('mac/@address')[0].content |
| 216 | nic_host = net.xpathEval('source/@network|source/@bridge|source/@dev|target/@dev')[0].content |
| 217 | try: |
| 218 | net = self.get_network(nic_host) |
| 219 | ip = get_mac_ipaddr(net, mac_host) |
| 220 | except: |
| 221 | ip = None |
| 222 | result.append({'mac': mac_host, 'nic': nic_host, 'ip': ip}) |
| 223 | return result |
| 224 | |
| 225 | return util.get_xml_path(self._XMLDesc(0), func=networks) |
| 226 |
nothing calls this directly
no test coverage detected