Skip to content

Commit

Permalink
#minor add SIP trunk export and remove custom img dir for pyinstaller…
Browse files Browse the repository at this point in the history
… to work
  • Loading branch information
Haas committed Apr 19, 2020
1 parent 667f20b commit 4e1ed0e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cucm-exporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import csv, json, sys
from pathlib import Path
from datetime import datetime
from ciscoaxl import axl
from ciscoris import ris
Expand All @@ -7,6 +8,9 @@
from gooey import Gooey, GooeyParser
import cucm

BASE_DIR = Path(__file__).resolve().parent
IMG_DIR = BASE_DIR.joinpath("img")

start_time = datetime.now()
print(f"status: starting {start_time}")

Expand Down Expand Up @@ -63,7 +67,7 @@ def write_csv(filename, results, content):
],
},
],
image_dir="img",
# image_dir=IMG_DIR,
tabbed_groups=True,
)
def main():
Expand Down Expand Up @@ -213,6 +217,13 @@ def main():
else:
print(f"status: no {cli_args.cucm_export} found...")
print(f"status: elapsed time -- {datetime.now() - start_time}\n")
elif cli_args.cucm_export == "sip-trunks":
output = cucm.export_siptrunks(ucm_axl)
if len(output) > 0:
write_csv(filename=filename, results=cli_args, content=output)
else:
print(f"status: no {cli_args.cucm_export} found...")
print(f"status: elapsed time -- {datetime.now() - start_time}\n")
else:
print(f"exporting {cli_args.cucm_export} is not yet supported")
return
Expand Down

0 comments on commit 4e1ed0e

Please sign in to comment.