"""
Method saving the class content to a file in json format.
:param filename: A valid path to a file on the system.
:type filename: string
"""
with open(filename, "w", encoding='utf-8') as json_file:
"""
Method saving the class content to a file in json format.
:param filename: A valid path to a file on the system.
:type filename: string
"""
with open(filename, "w", encoding='utf-8') as json_file:
json.dump(output, json_file,
ensure_ascii=False, indent=2)
json.dump(output, json_file,
ensure_ascii=False, indent=2)
- for key in ["Node", "Link"]:
- print(key + "s:", len(output
- ["tapi-common:context"]
- ["tapi-topology:topology-context"]
- ["topology"][0][key.lower()])
- )
+ if running is False:
+ for key in ["Node", "Link"]:
+ print(key + "s:", len(output
+ ["tapi-common:context"]
+ ["tapi-topology:topology-context"]
+ ["topology"][0][key.lower()])
+ )