Bug_Fix-2348 NS Update getting failed while using SFC feature 70/14370/1
authorkayal2001 <kayalvizhi.v@tataelxsi.co.in>
Wed, 13 Mar 2024 04:53:16 +0000 (10:23 +0530)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 9 May 2024 12:19:51 +0000 (14:19 +0200)
Change-Id: I3b00d301702a6b84212689d0f90f16a033a91ad0
Signed-off-by: kayal2001 <kayalvizhi.v@tataelxsi.co.in>
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm_lcm/ns.py

index 1504fb1..2fecb5d 100644 (file)
@@ -5906,6 +5906,12 @@ class NsLcm(LcmBase):
                                     )
                                 )
 
+                        step = "Checking whether the descriptor has SFC"
+                        if db_nsr.get("nsd", {}).get("vnffgd"):
+                            raise LcmException(
+                                "Ns update is not allowed for NS with SFC"
+                            )
+
                         # There is no change in the charm package, then redeploy the VNF
                         # based on new descriptor
                         step = "Redeploying VNF"
@@ -6286,6 +6292,10 @@ class NsLcm(LcmBase):
             old_operational_status = db_nsr["operational-status"]
             old_config_status = db_nsr["config-status"]
 
+            step = "Checking whether the descriptor has SFC"
+            if db_nsr.get("nsd", {}).get("vnffgd"):
+                raise LcmException("Scaling is not allowed for NS with SFC")
+
             step = "Parsing scaling parameters"
             db_nsr_update["operational-status"] = "scaling"
             self.update_db_2("nsrs", nsr_id, db_nsr_update)