aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic/vnf/tg_ping.py
AgeCommit message (Collapse)AuthorFilesLines
2019-02-07Update Intel Copyright for files edited in 2019John O Loughlin1-1/+1
JIRA: YARDSTICK-1591 Change-Id: I3ea9039d25bfce578681adb9e27e1598e84a1f56 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2019-01-29NSB sync: clean-up draft IPC implementation (part 1)Mytnyk, Volodymyr1-5/+5
The existing implementation of IPC is not finished and isn't used by any of the VNFs/TG implementation. It is used in the code but does nothing from functionality perspective. New syncronization mechanism is going to be implemented by using different approach than it was designed before. Thus, the current IPC mechanism is not going to be re-used. So, removing it. The IPC consumer/producer implementation is left as it may be required for other purposes. - Remove SampleVNF MQ consumer class - Remove IterationIPC MQ producer for VNF control messages - Remove MQ producer from SampleVNFTrafficGen class - Remove TrafficGeneratorProducer class - Remove IterationIPC runner - Remove unused task_id form VNF Generic initialization as it is not required for synchronization of VNFs/TGs anymore. - Fix UT JIRA: YARDSTICK-1592 Change-Id: I65fe51bcbd1bfeea0c43eb79ca6fb2aab5b65ae7 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez1-4/+4
This new class is designed to be used in a ``GenericVNF`` object (VNF or traffic generator) in a builder pattern. This consumer class will be instantiated when initializing the ``GenericVNF`` derived object. The ``GenericVNFConsumer`` endpoint is the ``GenericVNF``derived object itself. ``GenericVNFEndpoint`` is an interface class to be inherited in a ``GenericVNF`` child object; the VNF object will implement the endpoints methods. NewVNF(GenericVNF, GenericVNFEndpoint): def __init__(self, name, vnfd, task_id): ... self._consumer = vnf_base.GenericVNFConsumer([task_id], self) self._consumer.start_rpc_server() JIRA: YARDSTICK-1293 Change-Id: I1bcd980352099e9ebefdab0c96d51aa46f6a1e54 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-05Enable the MQ producer in "SampleVNFTrafficGen" classRodolfo Alonso Hernandez1-1/+1
Now all traffic generators using the default implementation of "ClientResourceHelper.run_traffic" will update the status of the traffic injection using the MQ. The available methods are listed in common.messsaging (VNF_METHOD_*): - tg_method_started: VNF app started - tg_method_finished: VNF app finished - tg_method_iteration: VNF app execution loop started JIRA: YARDSTICK-1127 Change-Id: I12829e1762fc20cc95da3b50767a66f031e25ee8 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-03Make GenericVNF an abstract classRodolfo Alonso Hernandez1-4/+0
GenericVNF class is now an abstract class. Only optional methods are implemented. Mandatory methods: - instantiate - wait_for_instantiate - terminate - scale - collect_kpi. JIRA: YARDSTICK-866 Change-Id: Ia8766f9f98816e11894d1e72b0f3bd573d091d99 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-19Variable local_iface_name is read before it is setJiri Prokes1-2/+1
Moving variable setting before reading Verified via TC: yardstick/samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml JIRA: YARDSTICK-899 Change-Id: Ia2feac1ed4e67dccd02446ba27afc9d40e87be35 Signed-off-by: Jiri Prokes <jirix.x.prokes@intel.com>
2017-11-17Make GenericTrafficGen class abstractRodolfo Alonso Hernandez1-12/+0
GenericTrafficGen class is now an abstract class. Only optional methods are implemented. - 'run_traffic' and 'terminate' are mandatory. - 'listen_traffic', 'verify_traffic' and 'wait_for_instance' are optional. By default these methods doesn't execute any action. JIRA: YARDSTICK-853 Change-Id: I2befdaa337af79cc2364bdd7c66183c31c5ab69a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-09-14NSB: fix port topologyMartin Banszel1-27/+47
Add a new PortPair class to resolve the topology into list of public and private ports. Before we were calculating public/private in multiple locations and using different conventions. In addition for all the DPDK test we need to use the DPDK port number and no rely on interface ordering or interface naming conventions. We used to use xe0 -> 0, xe1 -> 1, etc. This is not the DPDK port number. Use the new dpdknicbind_helper class to parse the output of dpdk-devbind.py to find the actual DPDK port number at runtime. We then use this DPDK port number to correctly calculate the port_mask_hex. The port mask maps the DPDK port num (PMD ID) to the LINK ID used in the pipeline config We also need to make sure we only use the interfaces matched to the topology and not use all the interfaces, because in some cases we will have unused interfaces. In particular TRex always requires an even number of interfaces, so for single port TRex tests we have to create the second port and not use it. Thus we had to modify the traffic generator stats code to only dump stats for used ports and no unused ports. Ixia was using interface ordering to map to Ixia ports, instead we use the dpdk_port_num which must be hardcoded for Ixia. Renamed traffic_profile.execute to traffic_profile.execute_traffic so we can trace the code easier. We pass the port used by the traffic profile to generate_samples so we don't get stats for unused ports. Fixed up vPE config creation and bring up issues. Fixed up CGNAPT and UDP_Replay to work correctly. Tested with 4-port scale-out Change-Id: I2e4f328bff2904108081e92a4bf712333fa73869 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-08-08NSB updateDeepak S1-93/+62
Refactored main NSB VNF classes accroding to class diagram https://wiki.opnfv.org/display/yardstick/NSB+class+diagram All the SampleVNFs have been separated and placed under the SampleVNF class. Added AutoConnectSSH to automatically create SSH conneciton on demand. Added VnfdHelper class to wrap the VNFD dictionary in prepartion for class-based modeling. Extracted DpdkVnfSetupEnvHelper for DPDK based VNF setup. Extracted Stats and other client config to ResourceHelper Had to replace dict_key_flatten with deepgetitem due to Python 2.7 Jinja2 infinite recursion. Change-Id: Ia8840e9c44cdbdf39aab6b02e6d2176b31937dc9 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-04-11standardize ssh authRoss Brattain1-10/+2
we need to be following defautl paramiko rules, first use pkey, then key_filenames (autodetecting ~/.ssh/ keys), then password We have too much boilerplate redudant code everywhere, we need to standardize on a factory function that takes a node dict. Using Python3 ChainMap we can layer overrides and defaults. VNF descriptors have to default key_filename, password to Python None. The only way to do this is to omit key values if the variable is not defined, this way the dict will not have the value and it will default to Python None Add python2 chainmap backport Updated unittest mocking to use ssh.SSH.from_node Change-Id: I80b0cb606e593b33e317c9e5e8ed0b74da591514 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-19Adding ping based sample VNF applianceDeepak S1-0/+167
This patch defines - Generic VNF APIs to test Network service --> instantiate --> collect_kpi --> run_traffic --> listen_traffic --> terminate - vnf Descriptor to map the physical NFVi topology of the Test unit. JIRA: YARDSTICK-491 Change-Id: I6b7e09972fc536977b65d8a19d635a220815e5f3 Signed-off-by: Deepak S <deepak.s@linux.intel.com>