X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=osm_nbi%2Finstance_topics.py;h=176f86d0df0d0c2778d76ddcf955d30aa7c62693;hb=c9c0339dee11c893b35e9eb05098554dbda751a3;hp=d37121645ac1b692234961c9bdcc730e147da698;hpb=0964edf54da6607131d354e1bcb30fbb97dbc5f4;p=osm%2FNBI.git diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index d371216..176f86d 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -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): @@ -1488,7 +1493,7 @@ class NsLcmOpTopic(BaseTopic): if in_vdu["id"] == vdu["id"]: for volume in get_iterable(in_vdu.get("volume")): for volumed in get_iterable(vdu.get("virtual-storage-desc")): - if volumed["id"] == volume["name"]: + if volumed == volume["name"]: break else: raise EngineException( @@ -1508,7 +1513,7 @@ class NsLcmOpTopic(BaseTopic): ): vdu_if_names.add(iface.get("name")) - for in_iface in get_iterable(in_vdu["interface"]): + for in_iface in get_iterable(in_vdu.get("interface")): if in_iface["name"] in vdu_if_names: break else: