def _get_interfaces(self, xml):
    'Note that this function takes a domain xml.\n\n        Returns a list of all network interfaces for this instance.\n        '
    doc = None
    try:
        doc = etree.fromstring(xml)
    except Exception:
        return []
    interfaces = []
    ret = doc.findall('./devices/interface')
    for node in ret:
        devdst = None
        for child in list(node):
            if (child.tag == 'target'):
                devdst = child.attrib['dev']
        if (devdst is None):
            continue
        interfaces.append(devdst)
    return interfaces
Note that this function takes a domain xml.

Returns a list of all network interfaces for this instance.
def _get_interfaces(self, xml):
    'Note that this function takes a domain xml.\n\n        Returns a list of all network interfaces for this instance.\n        '
    doc = None
    try:
        doc = etree.fromstring(xml)
    except Exception:
        return []
    interfaces = []
    ret = doc.findall('./devices/interface')
    for node in ret:
        devdst = None
        for child in list(node):
            if (child.tag == 'target'):
                devdst = child.attrib['dev']
        if (devdst is None):
            continue
        interfaces.append(devdst)
    return interfaces