def _get_switchports_by_ids(self, ids): return list(db.get_switchports_by_ids(ids))
def _get_switchports(self, neutron_port): switchports = neutron_port.get("switch:ports", []) switchport_ids = [sp["id"] for sp in switchports] return list(db.get_switchports_by_ids(switchport_ids))