X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fnetwork_services%2Fvnf_generic%2Fvnf%2Fvpe_vnf.py;h=bfff45c67b958576adc0580d393f6b1703cf0784;hb=7c8b47ee0c6fee700d46adfca118f02507981198;hp=0067f6bf9ce69ff600c09f729db0114e9763bf41;hpb=180b0b4c7b7288bc2fd8e2905858d17d0fefc93a;p=yardstick.git diff --git a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py index 0067f6bf9..bfff45c67 100644 --- a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py @@ -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__) @@ -115,7 +116,8 @@ class ConfigCreate(object): pktq = "SWQ{0}{1}".format(self.sw_q, sink) return pktq - def vpe_upstream(self, vnf_cfg, index=0): + def vpe_upstream(self, vnf_cfg, index=0): # pragma: no cover + # NOTE(ralonsoh): this function must be covered in UTs. parser = configparser.ConfigParser() parser.read(os.path.join(vnf_cfg, 'vpe_upstream')) @@ -147,7 +149,8 @@ class ConfigCreate(object): self.n_pipeline += 1 return parser - def vpe_downstream(self, vnf_cfg, index): + def vpe_downstream(self, vnf_cfg, index): # pragma: no cover + # NOTE(ralonsoh): this function must be covered in UTs. parser = configparser.ConfigParser() parser.read(os.path.join(vnf_cfg, 'vpe_downstream')) for pipeline in parser.sections(): @@ -300,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,