Modify test case and scale json 25/34625/1
authorfengyuanxing <feng.yuanxing@zte.com.cn>
Thu, 8 Mar 2018 02:11:26 +0000 (10:11 +0800)
committerfengyuanxing <feng.yuanxing@zte.com.cn>
Thu, 8 Mar 2018 02:11:26 +0000 (10:11 +0800)
Change-Id: Ib605f12d3490932a57d8d010cc1abee332dbd5a7
Issue-ID: VFC-784
Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
lcm/ns/data/scalemapping.json
lcm/pub/tests/test_scaleaspect.py

index 936e1f3..3391595 100644 (file)
@@ -15,7 +15,7 @@
                         {
                             "vnfd_id":"nf_zte_hss",
                             "vnf_scaleAspectId": "gpu",
-                            "numberOfSteps": "1"
+                            "numberOfSteps": "3"
                         }
                     ]
                 },
index 53d3a7d..d8e9b6f 100644 (file)
@@ -167,6 +167,14 @@ class TestScaleAspect(TestCase):
             self.scaling_map_json, "23", "TIC_EDGE_IMS", "1")
         self.assertIsNotNone(vnf_data_package)
         self.assertEqual(2, vnf_data_package.__len__())
+        self.assertIsNotNone(vnf_data_package)
+        self.assertEqual(2, vnf_data_package.__len__())
+        self.assertEqual("nf_zte_cscf", vnf_data_package[0]["vnfd_id"])
+        self.assertEqual("1", vnf_data_package[0]["numberOfSteps"])
+        self.assertEqual("gsu", vnf_data_package[0]["vnf_scaleAspectId"])
+        self.assertEqual("nf_zte_hss", vnf_data_package[1]["vnfd_id"])
+        self.assertEqual("3", vnf_data_package[1]["numberOfSteps"])
+        self.assertEqual("gpu", vnf_data_package[1]["vnf_scaleAspectId"])
 
     def test_get_scale_vnf_data_from_json_2(self):
         vnf_data_package = get_scale_vnf_data_from_json(