summaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/networking/test_vsperf.py
AgeCommit message (Collapse)AuthorFilesLines
2018-02-12Move tests: unit/benchmarkEmma Foley1-136/+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. Change-Id: I30eb4b0aafe0575d0cddbc946108291f21a98ed8 Jira: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-01-25Replace assertEqual(x, True|False) with assert[True|False](x)Emma Foley1-3/+3
Change-Id: Id19df79b4d27aab1a83d8350ce6395e87c13472b JIRA: YARDSTICK-903 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-08-08NSB updateDeepak S1-2/+0
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/+10
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-12Add support for Python 3Ross Brattain1-10/+16
Porting to Python3 using Openstack guidelines: https://wiki.openstack.org/wiki/Python3 This passes unittests on Python 3.5 and passes opnfv_smoke suite Updates: use six for urlparse and urlopen fix exception.message attribute removal run unittests on python3 use unitest.mock on python 3 fix open mock for vsperf fix float division by using delta/eplison comparison use unicode in StringIO use plugin/sample_config.yaml relative path from test case fixed apexlake unittests upgraded to mock 2.0.0 to match python3 unittest.mock features fixed flake8 issues implement safe JSON decode with oslo_serialization.jsonutils.dump_as_bytes() implement safe unicode encode/decode with oslo_utils.encodeutils heat: convert pub key file from bytes to unicode pkg_resources returns raw bytes, in python3 we have to decode this to utf-8 unicode so JSON can encode it for heat template JIRA: YARDSTICK-452 Change-Id: Ib80dd1d0c0eb0592acd832b82f6a7f8f7c20bfda Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2016-11-30vsperf: Enhanced vswitchperf configurationMartin Klozik1-5/+5
Original implementation of vsperf specific class was changed to relfect recent vsperf changes. It is now possible to modify any of vsperf's configuration parameters via --test-param CLI argument. It means, that it is possible to write a yardstick TC, which will define all required vsperf configuration inside the YAML TC definition. Vsperf documentation related to yardstick usage and sample TC files are located inside vsperf repository and they were updated by a separate patch. JIRA: VSPERF-422 Change-Id: I978d1c85ffeb3c90d9d47a20c6c0e0f68b437123 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: <sunshine.wang@huawei.com> Reviewed-by: <lvjing5@huawei.com> Reviewed-by: <jean.gaoliang@huawei.com> Reviewed-by: <david.j.chou@intel.com>
2016-07-01vsperf: Initial integration with VSPERFMartin Klozik1-0/+132
New scenario class allows to execute vsperf installed inside VM. Vsperf is executed in trafficgen mode. It means, it will only configure and execute traffic by external HW traffic generator based on custom configuration file. After traffic generator stops, then test results will be converted from vsperf CSV format into JSON and passed to yardstick for further processing. Currently, traffic is passed only through external bridge. In the future, test scenarios will launch VNFs and traffic will be properly routed to them. Proper routing can be ensured by OVS flows configuration via setup-script executed during setup phase. Testcase definition yaml files inside vsperf/ directory won't be pushed to the yardstick, but they will be stored inside vsperf repository. They are part of the draft review only to show how it is done. JIRA: VSPERF-288 Change-Id: I13a519ed39091fe89d1a43cc522738044fb3c609 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: <sunshine.wang@huawei.com> Reviewed-by: <lvjing5@huawei.com> Reviewed-by: <jean.gaoliang@huawei.com> Reviewed-by: <david.j.chou@intel.com>