diff options
author | Vincenzo Riccobene <vincenzox.m.riccobene@intel.com> | 2016-01-11 11:39:16 +0000 |
---|---|---|
committer | Jörgen Karlsson <jorgen.w.karlsson@ericsson.com> | 2016-01-11 16:50:05 +0000 |
commit | c434f069534284768a84c964b657523dc24bd14c (patch) | |
tree | 328325c932c806e899cea2996c15bc9050af1178 /tests | |
parent | 392220c5e02af317b152c746a7ac12aace4e438d (diff) |
Implementation of opnfv-yardstick-tc020 in Yardstick
Includes
- Yardstick Scenario for integration with ApexLake
- Yardstick Task .yaml file
- Documentation
JIRA: YARDSTICK-219
Change-Id: Ibbba1d9864e788fb6c81cc00c503e9f69e885651
Signed-off-by: Vincenzo Riccobene <vincenzox.m.riccobene@intel.com>
(cherry picked from commit 884e58ab48d0dcdc5e57b87ea181c0a4b8151fc8)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml | 31 | ||||
-rw-r--r-- | tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation.py | 48 |
2 files changed, 79 insertions, 0 deletions
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml new file mode 100644 index 000000000..8d9edfe7b --- /dev/null +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc020.yaml @@ -0,0 +1,31 @@ +--- +# Sample benchmark task config file +# vTC + +schema: "yardstick:task:0.1" + +scenarios: +- + type: vtc_instantiation_validation + + options: + vlan_sender: 1007 + vlan_receiver: 1006 + default_net_name: monitoring + default_subnet_name: monitoring_subnet + vlan_net_1_name: inbound_traffic_network + vlan_subnet_1_name: inbound_traffic_subnet + vlan_net_2_name: inbound_traffic_network + vlan_subnet_2_name: inbound_traffic_subnet + vnic_type: direct # [normal (OvS), direct (SR-IOV)] + vtc_flavor: m1.large + + runner: + type: Iteration + iterations: 1 + +# dummy context, will not be used by vTC +context: + type: Node + name: LF + file: /etc/yardstick/nodes/fuel_virtual/pod.yaml diff --git a/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation.py b/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation.py new file mode 100644 index 000000000..418dd39e6 --- /dev/null +++ b/tests/unit/benchmark/scenarios/networking/test_vtc_instantiation_validation.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +# Unittest for yardstick.benchmark.scenarios.networking.iperf3.Iperf + +import mock +import unittest + +from yardstick.benchmark.scenarios.networking import vtc_instantiation_validation + + +class VtcInstantiationValidationTestCase(unittest.TestCase): + + def setUp(self): + scenario = dict() + scenario['options'] = dict() + scenario['options']['default_net_name'] = '' + scenario['options']['default_subnet_name'] = '' + scenario['options']['vlan_net_1_name'] = '' + scenario['options']['vlan_subnet_1_name'] = '' + scenario['options']['vlan_net_2_name'] = '' + scenario['options']['vlan_subnet_2_name'] = '' + scenario['options']['vnic_type'] = '' + scenario['options']['vtc_flavor'] = '' + scenario['options']['packet_size'] = '' + scenario['options']['vlan_sender'] = '' + scenario['options']['vlan_receiver'] = '' + + self.vt = vtc_instantiation_validation.VtcInstantiationValidation(scenario, '') + + def test_run_for_success(self): + result = {} + self.vt.run(result) + + +def main(): + unittest.main() + +if __name__ == '__main__': + main() |