Skip to content

Commit 4e1ed0e

Browse files
author
Haas
committed
#minor add SIP trunk export and remove custom img dir for pyinstaller to work
1 parent 667f20b commit 4e1ed0e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cucm-exporter.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import csv, json, sys
2+
from pathlib import Path
23
from datetime import datetime
34
from ciscoaxl import axl
45
from ciscoris import ris
@@ -7,6 +8,9 @@
78
from gooey import Gooey, GooeyParser
89
import cucm
910

11+
BASE_DIR = Path(__file__).resolve().parent
12+
IMG_DIR = BASE_DIR.joinpath("img")
13+
1014
start_time = datetime.now()
1115
print(f"status: starting {start_time}")
1216

@@ -63,7 +67,7 @@ def write_csv(filename, results, content):
6367
],
6468
},
6569
],
66-
image_dir="img",
70+
# image_dir=IMG_DIR,
6771
tabbed_groups=True,
6872
)
6973
def main():
@@ -213,6 +217,13 @@ def main():
213217
else:
214218
print(f"status: no {cli_args.cucm_export} found...")
215219
print(f"status: elapsed time -- {datetime.now() - start_time}\n")
220+
elif cli_args.cucm_export == "sip-trunks":
221+
output = cucm.export_siptrunks(ucm_axl)
222+
if len(output) > 0:
223+
write_csv(filename=filename, results=cli_args, content=output)
224+
else:
225+
print(f"status: no {cli_args.cucm_export} found...")
226+
print(f"status: elapsed time -- {datetime.now() - start_time}\n")
216227
else:
217228
print(f"exporting {cli_args.cucm_export} is not yet supported")
218229
return

0 commit comments

Comments
 (0)