Fix Bug 1607 interface position is not taken into account
[osm/NBI.git] / osm_nbi / instance_topics.py
index 62df4f8..176f86d 100644 (file)
@@ -30,6 +30,7 @@ from osm_nbi.validation import (
     ns_heal,
     nsi_instantiate,
     ns_migrate,
+    ns_verticalscale,
 )
 from osm_nbi.base_topic import (
     BaseTopic,
@@ -895,7 +896,10 @@ class NsrTopic(BaseTopic):
                 vdur["internal-connection-point"].append(vdu_icp)
 
                 for iface in icp.get("virtual-network-interface-requirement", ()):
-                    iface_fields = ("name", "mac-address")
+                    # Name, mac-address and interface position is taken from VNFD
+                    # and included into VNFR. By this way RO can process this information
+                    # while creating the VDU.
+                    iface_fields = ("name", "mac-address", "position")
                     vdu_iface = {
                         x: iface[x] for x in iface_fields if iface.get(x) is not None
                     }
@@ -1167,6 +1171,7 @@ class NsLcmOpTopic(BaseTopic):
         "heal": ns_heal,
         "terminate": ns_terminate,
         "migrate": ns_migrate,
+        "verticalscale": ns_verticalscale,
     }
 
     def __init__(self, db, fs, msg, auth):