Merge "Added NSB descriptors for vCMTS testcase"
[yardstick.git] / yardstick / network_services / vnf_generic / vnf / cgnapt_vnf.py
index 53f73b4..ee4a581 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017 Intel Corporation
+# Copyright (c) 2016-2019 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@ from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, Dpd
 LOG = logging.getLogger(__name__)
 
 # CGNAPT should work the same on all systems, we can provide the binary
-CGNAPT_PIPELINE_COMMAND = 'sudo {tool_path} -p {port_mask_hex} -f {cfg_file} -s {script}'
+CGNAPT_PIPELINE_COMMAND = 'sudo {tool_path} -p {port_mask_hex} -f {cfg_file} -s {script} {hwlb}'
 WAIT_FOR_STATIC_NAPT = 4
 
-CGNAPT_COLLECT_KPI = """\
+CGNAPT_COLLECT_KPI = r"""\
 CG-NAPT(.*\n)*\
 Received\s(\d+),\
 Missed\s(\d+),\
@@ -120,3 +120,7 @@ class CgnaptApproxVnf(SampleVNF):
             self.vnf_execute(cmd)
 
         time.sleep(WAIT_FOR_STATIC_NAPT)
+
+    def wait_for_instantiate(self):
+        """Wait for VNF to initialize"""
+        self.wait_for_initialize()