summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-03-01vFW scale-up template.Mytnyk, Volodymyr1-1/+16
Added topology and traffic profile templates Added support for using JinJa2 templates in topology definition Added support for static pipeline configs for SampleVNFs JIRA: YARDSTICK-1043 Change-Id: Iab99fd5b5ad69ca32ee70b9fe47779387ad27e7f Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com> Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-03-01Add arguments to the traffic profile renderRodolfo Alonso Hernandez2-62/+6
In order to render configurable traffic profiles in NSB test cases, a new variable is introduced: "extra_arg". The content of this variable is added to the VNFD render data, under a key called "extra_args". This will allow the user to define Jinja templates for traffic profiles. E.g.: $ cat test_case_definition.yml scenarios: - type: NSPerf traffic_profile: traffic_profile.yml extra_args: vports: 10 $ cat traffic_profile.yml {% set vports = get(extra_args, 'vports', '0') or 4 %} {% for vport in range(vports|int) %} uplink_{{vport}}: data... {% endfor %} JIRA: YARDSTICK-946 Change-Id: Ib3c1f2d89efa012772edf2156e97d5f4742a6b80 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-01Import "traffic_profile" modules only onceRodolfo Alonso Hernandez7-55/+66
"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-02-28scenario: add opnfv_os-odl-bgpvpn-noha_daily.yamlRoss Brattain1-0/+23
adding missing scenario for Apex. https://gerrit.opnfv.org/gerrit/#/c/50045/ JIRA: YARDSTICK-998 Change-Id: I211f567587a4864b403ce321fea007a3c0963136 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-28NSB: Rename traffic_profile to trex_traffic_profileRoss Brattain3-16/+12
Make it more clear that traffic_profile is not a generic class. Eventually we can refactor a more generic traffic profile. Change-Id: I1bf44a8cafcdeb8d74efb9e85a34f6d7b526d036 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-28Merge "Deprecate authentication variable OS_TENANT_NAME"Ross Brattain1-3/+2
2018-02-28Merge "Improve SampleVNF hugepages setup"Abhijit Sinha1-36/+21
2018-02-28Merge "Addition of storage of extra counters for Grafana"Abhijit Sinha3-19/+111
2018-02-28Addition of storage of extra counters for GrafanaDanielMartinBuckley3-19/+111
JIRA: YARDSTICK-1036 This stores a number of extra counters in influxdb for Prox test cases. It also stores existing counters with a "succcess_" tag. Previously throughput where stored without success or failure indication. Also "Result_" counters are also stored. These can now be used by Grafana to graph output. Change-Id: Ie5636c14ecbab1b53a988bdfbd47ddd1fcdbd695 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-02-28Deprecate authentication variable OS_TENANT_NAMERodolfo Alonso Hernandez1-3/+2
OS_TENANT_NAME was deprecated as authentication variable in Keystone when moved from v2 to v3, in Icehouse (2014). Because this project doesn't support oldest versions, by default the only identification API version supported is v3. JIRA: YARDSTICK-902 Change-Id: I273fb0151ba583f7c8a5a809e5e8864e92c27d31 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-17Fix error in address input format in "_ip_range_action_partial"Rodolfo Alonso Hernandez1-12/+33
IP address format introduced in [1] should be unicode instead of string. "ipaddress.IPv4Address(min_value)" doesn't parse correctly the input parameter unless the parameter is in unicode format; this is valid both for Python version 2 and 3. Execution error if the parameter is a string: >>> int(ipaddress.IPv4Address('10.0.3.2')) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/ipaddress.py", line 1391, in __init__ self._check_packed_address(address, 4) File "/usr/local/lib/python2.7/dist-packages/ipaddress.py", line 554, in _check_packed_address expected_len, self._version)) ipaddress.AddressValueError: '10.0.3.2' (len 8 != 4) is not permitted as an IPv4 address. Did you pass in a bytes (str in Python 2) instead of a unic [1]https://github.com/opnfv/yardstick/blob/e5775e7efbc55f116b4d4ac11ff87b8d8553247e/yardstick/network_services/traffic_profile/traffic_profile.py#L87-L88 JIRA: YARDSTICK-996 Change-Id: Ic727a79044834b181c99789f0f5efc21c68f0ff2 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-16Merge "Remove tool provisioning from DpdkVnfSetupEnvHelper._setup_dpdk"Rodolfo Alonso Hernandez1-28/+25
2018-02-15NSB: Ixia remove unused traffic_generator argRoss Brattain1-43/+15
also fix pylint unittest warnings JIRA: YARDSTICK-1014 Change-Id: I4ff9769fdca89c6fc1fb9ca62e9f8ea6b174681e Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-14NSB: fix test_vpe_vnf.pyRoss Brattain1-1/+1
Change-Id: Ie1da572e2ac00e380b25f8e22f5aa9059dcb5238 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-14NSB: fix pylint warnings in test_tg_ixloadRoss Brattain1-2/+9
Change-Id: Ieb58167d8b20e0de32578b3df105a141507869d5 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-14NSB traffic_profile: fix pylint warnings and return partialRoss Brattain1-74/+118
also fix unittests Change-Id: Ie3026f5a0df8e690271afb71fe36ac531cbae2a0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-12Move tests: unit/benchmarkEmma Foley145-13989/+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-02-12Merge "Replace neutron get network id with shade."Emma Foley1-16/+40
2018-02-12Remove tool provisioning from DpdkVnfSetupEnvHelper._setup_dpdkRodolfo Alonso Hernandez1-28/+25
Both "uio" and "igb_uio" drivers are present in the VM image generated using "./nsb_setup.sh" script. "igb_uio" driver is compiled along with the DPDK library compilation. Tool "nsb_setup.sh" provisioning and execution should be removed from this function because there is not needed anymore. In case "igb_uio" driver is not loaded, an exception should be raised. JIRA: YARDSTICK-999 Change-Id: I89174f84ac36d8231587402c96751746cb18e290 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-12Merge "vpe: convert DPKD_PORT to LINK ID"Emma Foley1-0/+5
2018-02-12Merge "cleanup: rm node_ID from yardstick prepare_env file"Ross Brattain1-14/+13
2018-02-11Merge "Remove references to "dpdk_nic_bind" utility"Emma Foley5-45/+2
2018-02-09Replace neutron get network id with shade.Shobhi Jain1-16/+40
Function get_network_id now uses shade client instead of shade client. Removed redundant function: get_port_id. JIRA: YARDSTICK-890 Change-Id: I6081477fee39fa78131187e65daf3d7d3a9e439f Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-02-09Merge "Make 'Scenario' classes plugable"Emma Foley1-0/+53
2018-02-06vpe: convert DPKD_PORT to LINK IDRoss Brattain1-0/+5
http://dpdk.org/doc/guides/sample_app_ug/ip_pipeline.html#application-resources-present-in-the-configuration-file LINK instances are created implicitly based on the PORT_MASK application startup argument. LINK0 is the first port enabled in the PORT_MASK, port 1 is the next one, etc. The LINK ID is different than the DPDK PMD-level NIC port ID, which is the actual position in the bitmask mentioned above. For example, if bit 5 is the first bit set in the bitmask, then LINK0 is having the PMD ID of 5. This mechanism creates a contiguous LINK ID space and isolates the configuration file against changes in the board PCIe slots where NICs are plugged in. Change-Id: I6e449272cfcfb2b2a75c246f7f569e3f923da245 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-06Improve SampleVNF hugepages setupRodolfo Alonso Hernandez1-36/+21
The goal of this function is to: - Read the default hugepage size. - Set 16GB of hugepages. - Check if the status of the last action. According to [1], the default hugepage size could be read in "/proc/meminfo", always in kB. Then "/proc/sys/vm/nr_hugepages" could be used to set the number of default hugepages. [1] https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt JIRA: YARDSTICK-997 Change-Id: I762d1b16294ba1c1c2feee56610819ac358c7410 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-05cleanup: rm node_ID from yardstick prepare_env fileting wu1-14/+13
There is some redundant code in prepare_env.sh script for the fuel installer, the changes are to: 1. Remove variabls 'node_ID' and 'node_line_num'; 2. Rewrite section that replace ip address of controller/compute; 3 Add $YARDSTICK_REPO_DIR in front of variable 'pod_yaml'; JIRA: YARDSTICK-991 Change-Id: I4fbd2c2ba2e6109cc04dc452202fbed701d79b2b Signed-off-by: ting wu <ting.wu@enea.com>
2018-02-05Remove references to "dpdk_nic_bind" utilityRodolfo Alonso Hernandez5-45/+2
In DPDK 16.07 [1], "dpdk_nic_bind" utility was renamed to "dpdk-devbind". This patch removes all references to this previous naming to avoid confusions. [1] https://dpdk-guide.gitlab.io/dpdk-guide/setup/binding.html JIRA: YARDSTICK-995 Change-Id: I827c4c11c9e9e519f33f21b80459e7d65e51545e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-31Merge "Modify fuel_baremetal pod config file"Ross Brattain1-0/+5
2018-01-30Make 'Scenario' classes plugableRodolfo Alonso Hernandez1-0/+53
This patch makes yardstick.benchmark.scenario.base:Scenario classes plugable. A new entry point is added to the setup. This entry point could be extended in other plugin projects to add new Scenario classes. E.g.: take a look at [1]. This is a Yardstick plugin example project. Clone the project and execute, from the project directory: $ sudo -EH python setup.py install This will add a new module to python ('yardstick-new-plugin') and a new Scenario class. Now list the scenarios in Yardstick: $ yardstick scenario list ... | SpecCPU2006_for_VM | Spec CPU2006 benchmark for Virtual Machine | | SpecCPU2006 | Spec CPU2006 benchmark | | Dummy2 | Execute Dummy (v2!) echo | +-----------------------+--------------------------------------------+ [1] https://github.com/ralonsoh/yardstick_new_plugin JIRA: YARDSTICK-910 Change-Id: Ib70ee9bf4dc7ff91d1dd6377317b313288e36bff Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-29Merge "Fix up tests for Parser scenario"Ross Brattain1-25/+42
2018-01-29Merge "Move tests: unit/cmd/"Ross Brattain5-222/+0
2018-01-27Fix up tests for Parser scenarioEmma Foley1-25/+42
* Check the results at the test methods * Remove print statement from Parser scenario * Replace assertEquals(x, True) with assertTrue(x) Change-Id: I5c2612692e625fc888c7ce7637b9e1625440724a Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-26Merge "Replace assertEqual(x, True|False) with assert[True|False](x)"Ross Brattain22-48/+48
2018-01-26Merge changes from topic 'bug/yardstick-864'Ross Brattain16-169/+205
* changes: Replace assertEquals with assertEqual Make files pep8 compliant before using assertTrue|False
2018-01-26Merge "Remove generated file in 'test_build_vm_xml'"Rodolfo Alonso Hernandez1-3/+3
2018-01-26Modify fuel_baremetal pod config fileting wu1-0/+5
The current HA testcases failed on fuel baremetal installer with reason "SSHTimeout". This is due to incorrect ssh login info in the pod config file. The change is to by running 'prepare_env.sh' script to - read env vars 'USER_NAME' and 'SSH_KEY' - replace the 'node_username' to env var 'USER_NAME' - replace the "node_keyfile" to env var 'SSH_KEY' JIRA: ARMBAND-317 Change-Id: I0239892f447ae99ab4025eedcd133e1b6f04e5a5 Signed-off-by: ting wu <ting.wu@enea.com>
2018-01-25Replace assertEqual(x, True|False) with assert[True|False](x)Emma Foley22-48/+48
Change-Id: Id19df79b4d27aab1a83d8350ce6395e87c13472b JIRA: YARDSTICK-903 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-25Replace assertEquals with assertEqualEmma Foley5-17/+16
unittest.assertEquals is deprecated[1], and has been replaced with unittest.assertEqual. [1] https://docs.python.org/2/library/unittest.html#deprecated-aliases Change-Id: I9c6320e3a9ec5528036b529a9c32fc48b0bcfd62 JIRA: YARDSTICK-864 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-25Make files pep8 compliant before using assertTrue|FalseEmma Foley13-152/+189
JIRA: YARDSTICK-903 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: Id7912b5ddee36e7366bcfa824379853efd0a89f1
2018-01-25Move tests: unit/cmd/Emma Foley5-222/+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: I505d72e1c646fea1976a0bf854369c6b6308bbb1 Jira: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-25Remove img_modify_playbook from nsb_setup.sh scriptMytnyk, Volodymyr1-1/+1
The `img_modify_playbook` variable is not used anymore by the build_yardstick_image.yml. The `img_property` variable is used instead. The `img_modify_playbook` usage has been removed and the `img_property` has been introduced in YARDSTICK-879 JIRA story. JIRA: YARDSTICK-964 Change-Id: I0239544c4f4078de7a4817292ab6bd789c21e944 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> Signed-off-by: Alonso Hernandez, Rodolfo <rodolfo.alonso.hernandez@intel.com>
2018-01-24Remove generated file in 'test_build_vm_xml'Rodolfo Alonso Hernandez1-3/+3
Change I22e95c488e27d6e2a8fdf6c1a07faab275fa6bba introduced a change in test case 'test_build_vm_xml' [1]. This test case generates a file which is stored locally but never removed. [1]https://github.com/opnfv/yardstick/blob/80dc9034edeb05f66bfa6264ae0adf0f6aea60da/tests/unit/benchmark/contexts/standalone/test_model.py JIRA: YARDSTICK-918 Change-Id: I91d39bb37c3d8a273fe68155bb308c5a3bc1ca9d Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-24Merge "'libvirt' guest console in Standalone model"Ross Brattain1-21/+21
2018-01-23Merge "Use assertIn(x, y) instead of other variations"Rodolfo Alonso Hernandez1-15/+21
2018-01-23Rename ResourceProfile.check_if_sa_running()Emma Foley4-23/+28
* Update log message and rename method to make debugging easier * Fix pep8 violations in touched files JIRA: YARDSTICK-859 Change-Id: Id138d72cd8557ffacd5dcc81d06feeb484e13625 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-22Merge "Clean unit tests in "benchmark.scenarios.lib.test_create_volume.py"Ross Brattain1-16/+67
2018-01-22Merge "Move tests: unit/dispatcher"Ross Brattain3-183/+0
2018-01-22Merge "Move tests: unit/orchestrator/"Ross Brattain3-453/+0
2018-01-22Clean unit tests in "benchmark.scenarios.lib.test_create_volume.pyEmma Foley1-16/+67
* Use mock_object.assert_called_with instead of self.assertTrue(mock_object.called) * Remove an unneeded if clause in CreateVolume * Add individual tests for each method in CreateVolume Change-Id: I54cc56434d316f059b3822879145e6a299866fcb Signed-off-by: Emma Foley <emma.l.foley@intel.com>