From 63b56ed1d74657129006f066a3f118c4c369d23c Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Tue, 15 May 2018 01:42:35 -0700 Subject: connections: Introduction of generic API Redesign of vSwitch and vSwitch controller classes, to use generic connection methods for configuration of vSwitch. This API is more generic and vSwitch agnostic, thus deployment scenarios like P2P, PVP, PVVP (i.e. PVVPx) can be used for all (currently) supported vSwitches. Usage of new API will simplify an introduction of new vSwitches in the future. This patchset introduces following changes: * OVS: implementation of add_, del_, dump_ connection(s) and their validation methods * VPP: bidir parameter removed - it is up to the deployment scenario implementation to take care about bidirectional connections * P2P and PXP controllers were updated to use connection methods instead of flow related methods. Thus standard TCs will support both OVS and VPP. NOTE, PVPV is not supported for VPP (yet?). * refactoring of vSwitch interfaces and inherited classes * VPP step driven TCs were replaced by standard TCs with appropriate deployment scenarios. This is for backward compatibility with TC reporting. Once reporting of VPP TC results into results DB will be modified, this TCs can be removed. * OVS routing tables support was generalized to support P2P and PXP deployments and step driven TCs. Usage of OVS routing tables is now configurable (turned off by default) for better comparison of results among various vSwitches. * Multistream pre_installed_flows feature was generalized to support P2P and PXP deployments and step driven TCs. * IxNet: TRAFFIC['l4']['dstport'] will be used as a start value for port iteration if L4 multistream feature is enabled. * OVS: default flow template is now configurable via OVS_FLOW_TEMPLATE * OVS: support of TRAFFIC['flow_type']='ip' was generalized to work with connection methods (i.e. with P2P and PXP deployments and step driven TCs) * integration TCs: modification of integration TCs and their macros to utilize new generic connection based API * CI: list of TCs for VERIFY & MERGE jobs was changed to run the same generic tests for both OVS & VPP * documentation update * small fixes and improvements JIRA: VSPERF-579 Change-Id: If4e6e6037929eab9f16c2bbcb8a0fb30e5d6f9b0 Signed-off-by: Martin Klozik Reviewed-by: Richard Elias Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao --- core/component_factory.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'core/component_factory.py') diff --git a/core/component_factory.py b/core/component_factory.py index b6bd2677..2c51a060 100644 --- a/core/component_factory.py +++ b/core/component_factory.py @@ -1,4 +1,4 @@ -# Copyright 2015-2017 Intel Corporation. +# Copyright 2015-2018 Intel Corporation., Tieto # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -66,23 +66,23 @@ def create_vswitch(deployment_scenario, vswitch_class, traffic, :return: IVSwitchController for the deployment_scenario """ # pylint: disable=too-many-return-statements - deployment_scenario = deployment_scenario.lower() - if deployment_scenario.startswith("p2p"): - return VswitchControllerP2P(vswitch_class, traffic) - elif deployment_scenario.startswith("pvp"): - return VswitchControllerPXP(deployment_scenario, vswitch_class, traffic) - elif deployment_scenario.startswith("pvvp"): - return VswitchControllerPXP(deployment_scenario, vswitch_class, traffic) - elif deployment_scenario.startswith("pvpv"): - return VswitchControllerPXP(deployment_scenario, vswitch_class, traffic) - elif deployment_scenario.startswith("op2p"): - return VswitchControllerOP2P(vswitch_class, traffic, tunnel_operation) - elif deployment_scenario.startswith("ptunp"): - return VswitchControllerPtunP(vswitch_class, traffic) - elif deployment_scenario.startswith("clean"): - return VswitchControllerClean(vswitch_class, traffic) + deployment = deployment_scenario.lower() + if deployment.startswith("p2p"): + return VswitchControllerP2P(deployment, vswitch_class, traffic) + elif deployment.startswith("pvp"): + return VswitchControllerPXP(deployment, vswitch_class, traffic) + elif deployment.startswith("pvvp"): + return VswitchControllerPXP(deployment, vswitch_class, traffic) + elif deployment.startswith("pvpv"): + return VswitchControllerPXP(deployment, vswitch_class, traffic) + elif deployment.startswith("op2p"): + return VswitchControllerOP2P(deployment, vswitch_class, traffic, tunnel_operation) + elif deployment.startswith("ptunp"): + return VswitchControllerPtunP(deployment, vswitch_class, traffic) + elif deployment.startswith("clean"): + return VswitchControllerClean(deployment, vswitch_class, traffic) else: - raise RuntimeError("Unknown deployment scenario '{}'.".format(deployment_scenario)) + raise RuntimeError("Unknown deployment scenario '{}'.".format(deployment)) def create_vnf(deployment_scenario, vnf_class, extra_vnfs): -- cgit 1.2.3-korg