Bug 2210 NS instantiation fails in basic12
[osm/LCM.git] / osm_lcm / ns.py
index 20e813f..8f2b192 100644 (file)
@@ -2999,6 +2999,9 @@ class NsLcm(LcmBase):
         cached_vnfds: Dict[str, Any],
     ) -> List[Relation]:
         relations = []
+        if vca.target_element == "ns":
+            self.logger.debug("VCA is a NS charm, not a VNF.")
+            return relations
         vnf_profile = get_vnf_profile(nsd, vca.vnf_profile_id)
         vnf_profile_id = vnf_profile["id"]
         vnfd_id = vnf_profile["vnfd-id"]