Ues json file names as expected by o-ran-sc-topology service
- generate different output for "running" and for operational
Issue-Id: OAM-258
Change-Id: I31850920c0e45da5563b338a4379d1afa3769121
Signed-off-by: demx8as6 <martin.skorupski@highstreet-technologies.com>
diff --git a/code/network-topology-instance-generator/tapi_topology_generator.py b/code/network-topology-instance-generator/tapi_topology_generator.py
index 8c632c1..2bd27b1 100644
--- a/code/network-topology-instance-generator/tapi_topology_generator.py
+++ b/code/network-topology-instance-generator/tapi_topology_generator.py
@@ -30,14 +30,23 @@
network = generator.generate()
viewer = NetworkViewer(network)
- filename: str = "output/network.json"
- if configuration['network']['name']:
- filename = "output/" + configuration['network']['name'] + ".json"
- viewer.json().save(filename)
+ # operational json
+ filename: str = "output/tapi-common-operational.json"
+ if "name" in configuration['network']:
+ filename = "output/" + configuration['network']['name'] + "-operational.json"
+ viewer.json().save(filename, False)
+
+ # running json
+ filename: str = "output/tapi-common-running.json"
+ if "name" in configuration['network']:
+ filename = "output/" + configuration['network']['name'] + "-running.json"
+ viewer.json().save(filename, True)
+
# viewer.json().showAsJson()
- filename: str = "output/network.svg"
- if configuration['network']['name']:
+ # svg
+ filename: str = "output/o-ran-sc-topology-view.svg"
+ if "name" in configuration['network']:
filename = "output/" + configuration['network']['name'] + ".svg"
viewer.svg(filename)