Create a SampleVNF MQ consumer class
[yardstick.git] / yardstick / network_services / vnf_generic / vnf / cgnapt_vnf.py
index 53f73b4..14f1e2e 100644 (file)
@@ -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+),\
@@ -85,12 +85,12 @@ class CgnaptApproxVnf(SampleVNF):
         "packets_dropped": 4,
     }
 
-    def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
+    def __init__(self, name, vnfd, task_id, setup_env_helper_type=None,
+                 resource_helper_type=None):
         if setup_env_helper_type is None:
             setup_env_helper_type = CgnaptApproxSetupEnvHelper
-
-        super(CgnaptApproxVnf, self).__init__(name, vnfd, setup_env_helper_type,
-                                              resource_helper_type)
+        super(CgnaptApproxVnf, self).__init__(
+            name, vnfd, task_id, setup_env_helper_type, resource_helper_type)
 
     def _vnf_up_post(self):
         super(CgnaptApproxVnf, self)._vnf_up_post()