Merge "vPE Sample VNF is missing in the installation scripts"
[yardstick.git] / yardstick / network_services / vnf_generic / vnf / vpe_vnf.py
index 9deef5c..57ea2ee 100644 (file)
@@ -28,6 +28,7 @@ from yardstick.common.process import check_if_process_failed
 from yardstick.network_services.helpers.samplevnf_helper import PortPairs
 from yardstick.network_services.pipeline import PipelineRules
 from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, DpdkVnfSetupEnvHelper
+from yardstick.benchmark.contexts import base as ctx_base
 
 LOG = logging.getLogger(__name__)
 
@@ -238,7 +239,7 @@ class ConfigCreate(object):
 
 class VpeApproxSetupEnvHelper(DpdkVnfSetupEnvHelper):
 
-    APP_NAME = 'vPE_vnf'
+    APP_NAME = 'vPE'
     CFG_CONFIG = "/tmp/vpe_config"
     CFG_SCRIPT = "/tmp/vpe_script"
     TM_CONFIG = "/tmp/full_tm_profile_10G.cfg"
@@ -285,7 +286,7 @@ class VpeApproxSetupEnvHelper(DpdkVnfSetupEnvHelper):
 class VpeApproxVnf(SampleVNF):
     """ This class handles vPE VNF model-driver definitions """
 
-    APP_NAME = 'vPE_vnf'
+    APP_NAME = 'vPE'
     APP_WORD = 'vpe'
     COLLECT_KPI = VPE_COLLECT_KPI
     WAIT_TIME = 20
@@ -302,7 +303,11 @@ class VpeApproxVnf(SampleVNF):
     def collect_kpi(self):
         # we can't get KPIs if the VNF is down
         check_if_process_failed(self._vnf_process)
+        physical_node = ctx_base.Context.get_physical_node_from_server(
+            self.scenario_helper.nodes[self.name])
+
         result = {
+            "physical_node": physical_node,
             'pkt_in_up_stream': 0,
             'pkt_drop_up_stream': 0,
             'pkt_in_down_stream': 0,