def get_vif_port_to_ofport_map(self):
        results = self.get_ports_attributes(
            'Interface', columns=['name', 'external_ids', 'ofport'],
            if_exists=True)
        port_map = {}
        for r in results:
            # fall back to basic interface name
            key = self.portid_from_external_ids(r['external_ids']) or r['name']
            try:
                port_map[key] = int(r['ofport'])
            except __HOLE__:
                # port doesn't yet have an ofport entry so we ignore it
                pass
        return port_map
dataset/ETHPy150Open openstack/neutron/neutron/agent/common/ovs_lib.py/OVSBridge.get_vif_port_to_ofport_map