Read now works, and terraform directory contains example code
This commit is contained in:
1 parent
ef498e4a72
commit
a6f1019175
43 files changed
+4341
-38
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import json
|
||||
|
||||
import switch_client
|
||||
import todo
|
||||
from extractors.xe_page import fetch_tables
|
||||
|
||||
PATH = "/TrunkStatus.html"
|
||||
|
||||
|
||||
def get_trunk_status(session) -> list[dict]:
|
||||
"""Returns one dict per configured trunk. Empty list if no trunks exist."""
|
||||
tables = fetch_tables(session, PATH)
|
||||
return tables["Trunk Status"]["rows"]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
session = switch_client.get_session()
|
||||
print(json.dumps(get_trunk_status(session), indent=2))
|
||||
todo.mark_implemented(switch_client.BASE_URL + PATH)
|
||||
Reference in new issue
Block a user