aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-11Move tests: unit/network_services/vnf_genericEmma Foley1-352/+0
* Fix pylint errors * Add TODOs Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged with a TODO, and should be fixed later. JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: I3d95537a64bde923703421510d27bac0d6dd92bd
2018-03-02Remove main() and __main__ from tests.Emma Foley1-2/+0
Removes the unnecessary main() functions from tests. Also removes shebang (#!) where it appears at the top of files. JIRA: YARDSTICK-861 Change-Id: I79180d1eb9c5bce640142dd62ce28c7437c1b210 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-03-02Replace assertEqual(None, xx) with assertIsNone(xx)Emma Foley1-2/+2
Change-Id: Ie956d8064a8fbcbd3d56c5a79c4c613d35184af4 JIRA: YARDSTICK-942 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-03-01Import "traffic_profile" modules only onceRodolfo Alonso Hernandez1-2/+4
"traffic_profile" modules should be imported only once. Every time TrafficProfile.get is called, the modules under "yardstick.network_services.traffic_profiles" are loaded [1]. Instead of this, the modules should be registered only once the first time "yardstick.network_services.traffic_profiles.base" is loaded. This will reduce the execution time and will avoid unnecessary calls. [1] https://github.com/opnfv/yardstick/blob/d2c7cc4e9768ed003257a95c92cdb278d516761b/yardstick/network_services/traffic_profile/base.py#L36-L37 JIRA: YARDSTICK-951 Change-Id: Ia3565378ba3a1377fcb0aea8bda50ef8189414fd Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-03Make GenericVNF an abstract classRodolfo Alonso Hernandez1-17/+11
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-09-22tg_rfc2544_ixia: log exceptions and fix list iterRoss Brattain1-7/+11
Change-Id: Ia9722604b7c8ae23e784e780f113d012de544d4b Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-20tg_rfc2544_ixia: use traffic id from JSON to update macRoss Brattain1-4/+5
we were using raw sort index of the interfaces to set the MAC address, but we should be using the traffic id from the static JSON instead. Change-Id: I13284db04abb3eaf8c9826974a9e5aa1c37b3891 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-14NSB: fix port topologyMartin Banszel1-75/+73
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-09-07Adding ixia latency support for dynamic cgnaptDeepak S1-1/+3
Change-Id: I346f6064c39cb5662c2b17ca0f520addbe5eae4c Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-08-31Added TC for vFW in heat context with ixia TGMaciej Skrocki1-3/+6
- added common method to get relative paths - added 'Ixia' APP_NAME Change-Id: I7966798bab71af66d3efbeb1e13b07e8fbb41e88 Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com>
2017-08-24Standardized TRex client library pathMaciej Skrocki1-59/+4
- path should be defined via TREX_CLIENT_LIB environmental variable e.g. TREX_CLIENT_LIB=/opt/trex_client/stl - refactored unit tests Change-Id: I18767e48daf774432c010f1b88d18a4f0ee4e156 Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-08-08IXIA traffic generatorDeepak S1-0/+405
Change-Id: I09bcb3f2c4b945283070d442589d3bf00468abbc 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>