diff options
author | Juan Vidal <juan.vidal.allende@ericsson.com> | 2017-02-06 15:16:28 +0100 |
---|---|---|
committer | Juan Vidal <juan.vidal.allende@ericsson.com> | 2017-02-06 15:23:03 +0100 |
commit | cd28e72f17efd9fc666ef8d911a11f2a7afbaab8 (patch) | |
tree | 29e284953f80480b3b9c81e4883e58998852a6d8 | |
parent | b271d9361b4f534113f59c17dd28b088c121189c (diff) |
Remove unused variables and collapse some function calls
- Argument parsing is not used in sfc_two_chains_SSH_and_HTTP test
- Collapsed into just one line function calls that fit in 79 characters
Change-Id: I630686d109e03dabda0c4e45f946a69d506ccebd
Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
-rw-r--r-- | sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py index 2383bb3e..e112e07b 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -8,7 +8,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 # -import argparse import os import sys import threading @@ -17,19 +16,12 @@ import functest.utils.functest_logger as ft_logger import functest.utils.openstack_tacker as os_tacker import functest.utils.openstack_utils as os_utils import opnfv.utils.ovs_logger as ovs_log + import sfc.lib.config as sfc_config import sfc.lib.utils as test_utils from sfc.lib.results import Results -parser = argparse.ArgumentParser() - -parser.add_argument("-r", "--report", - help="Create json result file", - action="store_true") - -args = parser.parse_args() - """ logging configuration """ logger = ft_logger.Logger("ODL_SFC").getLogger() @@ -111,24 +103,17 @@ def main(): srv_prv_ip = srv_instance.networks.get(TESTCASE_CONFIG.net_name)[0] - tosca_file = os.path.join(COMMON_CONFIG.sfc_test_dir, - COMMON_CONFIG.vnfd_dir, - TESTCASE_CONFIG.test_vnfd_red) - os_tacker.create_vnfd( - tacker_client, - tosca_file=tosca_file) + tosca_red = os.path.join(COMMON_CONFIG.sfc_test_dir, + COMMON_CONFIG.vnfd_dir, + TESTCASE_CONFIG.test_vnfd_red) + os_tacker.create_vnfd(tacker_client, tosca_file=tosca_red) - tosca_file = os.path.join(COMMON_CONFIG.sfc_test_dir, + tosca_blue = os.path.join(COMMON_CONFIG.sfc_test_dir, COMMON_CONFIG.vnfd_dir, TESTCASE_CONFIG.test_vnfd_blue) - os_tacker.create_vnfd( - tacker_client, - tosca_file=tosca_file) - - os_tacker.create_vnf( - tacker_client, 'testVNF1', vnfd_name='test-vnfd1') - os_tacker.create_vnf( - tacker_client, 'testVNF2', vnfd_name='test-vnfd2') + os_tacker.create_vnfd(tacker_client, tosca_file=tosca_blue) + os_tacker.create_vnf(tacker_client, 'testVNF1', vnfd_name='test-vnfd1') + os_tacker.create_vnf(tacker_client, 'testVNF2', vnfd_name='test-vnfd2') try: os_tacker.wait_for_vnf(tacker_client, vnf_name='testVNF1') |