Commit 0d7be1f5 authored by Simon Redman's avatar Simon Redman

Allow orchestrator to write resulting NetJSON file

parent 742495bf
......@@ -19,6 +19,7 @@
import add_routable_ipv6_addrs
import frr_configurator
import json
import ssh_helper
import sysctl_configurator
import topomap_parser
......@@ -33,6 +34,8 @@ if __name__ == "__main__":
help="Path to the emulab topomap file to parse")
parser.add_argument("--netgraph-file", action='store', type=str, required=False,
help="Path to the NetJSON file to parse. Skips parsing the netgrap from the topomap-file")
parser.add_argument("--netgraph-write", action='store', type=str, required=False,
help="(Optional) Path to write the final NetJSON file")
parser.add_argument("--username", action='store', type=str, default=getpass.getuser(),
help="Username to use on all hosts. Defaults to current user's username")
parser.add_argument("--stop", action='store_true',
......@@ -70,3 +73,7 @@ if __name__ == "__main__":
if args.netgraph_write:
with open(args.netgraph_write) as outfile:
json.dumps(netgraph.json(dict=True), outfile)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment