docs: def get_ports(device_owners=None, vnic_type=None, port_id=None, active=True):
      """Returns list of all ports in neutron the db"""
      session = db.get_reader_session()
      with session.begin():
          port_model = models_v2.Port
          ports = (session
                   .query(port_model)
                   .filter_unnecessary_ports(device_owners, vnic_type, active))
          if port_id:
              ports = ports.filter(port_model.id == port_id)
      return ports.all()