def METHOD_NAME(self):
    ports = []
    if self.hostXml is None:
        return ports
    if self.isNewHost:
        for port in self.hostXml.find('ports').findall('port'):
            ports.append(
                [port.get('portid'), port.find('state').get('state')])
        return ports
    else:
        for port in self.hostXml.find('ports').findall('portdiff'):
            if port.find('b/port'):
                ports.append([port.find('b/port').get('portid'),
                              port.find('b/port/state').get('state')])
        return ports