diff options
author | Martin Klozik <martin.klozik@tieto.com> | 2018-06-18 18:40:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-06-18 18:40:11 +0000 |
commit | 7e3db8dbc23d91484cc608bd8cb1d42ea7729396 (patch) | |
tree | 60d5fff01020b365779079ce1b9c60defdf69bcf /core/component_factory.py | |
parent | 89018d21b6383f853a01c57a2270153d266fe087 (diff) | |
parent | 63b56ed1d74657129006f066a3f118c4c369d23c (diff) |
Merge "connections: Introduction of generic API"
Diffstat (limited to 'core/component_factory.py')
-rw-r--r-- | core/component_factory.py | 34 |
1 files changed, 17 insertions, 17 deletions
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): |