gns3converter.main¶
- gns3converter.main.do_conversion(topology_def, args)¶
Convert the topology
Parameters: topology_def (dict) – Dict containing topology file and snapshot bool
- gns3converter.main.get_snapshots(topology)¶
Return the paths of any snapshot topologies
Parameters: topology (str) – topology file Returns: list of dicts containing snapshot topologies Return type: list
- gns3converter.main.main()¶
Entry point for gns3-converter
- gns3converter.main.name(args)¶
Calculate the name to save the converted topology as
Returns: new topology name Return type: str
- gns3converter.main.save(args, converter, json_topology, snapshot)¶
Save the converted topology
Parameters: - args – Program arguments
- converter (Converter) – Converter instance
- json_topology (JSONTopology) – JSON topology layout
- snapshot (bool) – Snapshot Boolean
- gns3converter.main.setup_argparse()¶
Setup the argparse argument parser
Returns: instance of argparse Return type: ArgumentParser
- gns3converter.main.snapshot_name(topo_name)¶
Get the snapshot name
Parameters: topo_name (str) – topology name Returns:
- gns3converter.main.topology_abspath(topology)¶
Get the absolute path of the topology file
Parameters: topology (str) – Topology file Returns: Absolute path of topology file Return type: str
- gns3converter.main.topology_dirname(topology)¶
Get the directory containing the topology file
Parameters: topology (str) – topology file Returns: directory which contains the topology file Return type: str