batfish / pybatfish

Python client for Batfish: https://github.com/batfish/batfish
Apache License 2.0
208 stars 51 forks source link

Change the Session port key to port instead of port_v2 #917

Closed ratulm closed 1 month ago

ratulm commented 1 month ago

Now that 9997 is fully deprecated, the Session variable for port can be just port https://github.com/batfish/pybatfish/blob/master/pybatfish/client/session.py

Example user confusion: https://batfish-org.slack.com/archives/C8XKQNHAQ/p1721301033303939

dhalperi commented 1 month ago

Probably should include retaining port_v2 as an alias for port.

Ashkan-Najarian commented 1 month ago

Thanks to @rickdonato for helping with this:

Rick Donato: If you use rich inspect against the session object you will see the attributes you can change. In [3]: inspect(Session) ╭─────────────────────────────────────────────── <class 'pybatfish.client.session.Session'> ───────────────────────────────────────────────╮ │ class Session(host: str = 'localhost', port_v1: int = 9997, port_v2: int = 9996, ssl: bool = False, verify_ssl_certs: bool = True, │ │ api_key: str = '00000000000000000000000000000000', load_questions: bool = True, use_deprecated_workmgr_v1: Optional[bool] = None):