Move all business logic code under template folder
[oam.git] / code / network-topology-instance-generator / model / python / tapi_topology.py
index 80ac008..a80e873 100644 (file)
@@ -47,12 +47,16 @@ class TapiTopology(Top):
     # constructor
     def __init__(self, configuration: dict):
         super().__init__(configuration)
+        name = "o-ran-sc-topology-view"
+        if "name" in configuration['network']:
+            name = configuration['network']['name']
+
         self.__configuration = configuration
         self.__data = {
             "uuid": str(uuid.uuid4()),
             "name": [{
                 "value-name": "network-name",
-                "value": configuration['network']['name']}],
+                "value": name}],
             "layer-protocol-name": ["ETH"],
             "node": [],
             "link": []}
@@ -484,7 +488,7 @@ class TapiTopology(Top):
                 # E2
                 link_configuration = {
                     "topology_reference": self.data()["uuid"],
-                    "name_prefix": "e2-rest",
+                    "name_prefix": "e2-sctp",
                     "provider": node[plane],
                     "consumer": parent
                 }
@@ -579,7 +583,7 @@ class TapiTopology(Top):
                 # E2
                 link_configuration = {
                     "topology_reference": self.data()["uuid"],
-                    "name_prefix": "e2-rest",
+                    "name_prefix": "e2-sctp",
                     "provider": node,
                     "consumer": parent.parent()
                 }