diff options
-rwxr-xr-x | functest/ci/config_functest.yaml | 2 | ||||
-rwxr-xr-x | functest/ci/prepare_env.py | 2 | ||||
-rwxr-xr-x | functest/ci/run_tests.py | 2 | ||||
-rwxr-xr-x | functest/ci/tier_builder.py | 2 | ||||
-rwxr-xr-x | functest/ci/tier_handler.py | 6 | ||||
-rw-r--r-- | functest/cli/commands/cli_env.py | 2 | ||||
-rw-r--r-- | functest/cli/commands/cli_os.py | 2 | ||||
-rw-r--r-- | functest/cli/commands/cli_testcase.py | 2 | ||||
-rw-r--r-- | functest/cli/commands/cli_tier.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_base.py | 2 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/vping/vping_ssh.py | 6 | ||||
-rwxr-xr-x | functest/opnfv_tests/sdn/odl/odl.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py | 14 | ||||
-rw-r--r-- | functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/clearwater.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py | 2 | ||||
-rwxr-xr-x | functest/utils/functest_logger.py | 2 |
17 files changed, 28 insertions, 26 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index edae600c..7beb9d4b 100755 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -45,6 +45,8 @@ general: image_name: Cirros-0.3.4 image_file_name: cirros-0.3.4-x86_64-disk.img image_disk_format: qcow2 + image_username: cirros + image_password: cubswin:) flavor_name: opnfv_flavor flavor_ram: 512 diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py index 86e92291..bec60d13 100755 --- a/functest/ci/prepare_env.py +++ b/functest/ci/prepare_env.py @@ -37,7 +37,7 @@ with open(CONFIG_PATCH_PATH) as f: functest_patch_yaml = yaml.safe_load(f) -class PrepareEnvParser(): +class PrepareEnvParser(object): def __init__(self): self.parser = argparse.ArgumentParser() diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 93518de0..f920e70d 100755 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -48,7 +48,7 @@ class BlockingTestFailed(Exception): pass -class RunTestsParser(): +class RunTestsParser(object): def __init__(self): self.parser = argparse.ArgumentParser() diff --git a/functest/ci/tier_builder.py b/functest/ci/tier_builder.py index e1c3e49e..dae7c73e 100755 --- a/functest/ci/tier_builder.py +++ b/functest/ci/tier_builder.py @@ -11,7 +11,7 @@ import tier_handler as th import yaml -class TierBuilder: +class TierBuilder(object): def __init__(self, ci_installer, ci_scenario, testcases_file): self.ci_installer = ci_installer diff --git a/functest/ci/tier_handler.py b/functest/ci/tier_handler.py index 1eadfba5..127986bf 100755 --- a/functest/ci/tier_handler.py +++ b/functest/ci/tier_handler.py @@ -28,7 +28,7 @@ def split_text(text, max_len): return lines -class Tier: +class Tier(object): def __init__(self, name, order, ci_loop, description=""): self.tests_array = [] @@ -102,7 +102,7 @@ class Tier: return out -class TestCase: +class TestCase(object): def __init__(self, name, dependency, criteria, blocking, description=""): self.name = name @@ -160,7 +160,7 @@ class TestCase: return out -class Dependency: +class Dependency(object): def __init__(self, installer, scenario): self.installer = installer diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py index 9423631b..14ad01bf 100644 --- a/functest/cli/commands/cli_env.py +++ b/functest/cli/commands/cli_env.py @@ -16,7 +16,7 @@ from functest.utils.constants import CONST import functest.utils.functest_utils as ft_utils -class CliEnv: +class CliEnv(object): def __init__(self): pass diff --git a/functest/cli/commands/cli_os.py b/functest/cli/commands/cli_os.py index aeb34974..f85f4041 100644 --- a/functest/cli/commands/cli_os.py +++ b/functest/cli/commands/cli_os.py @@ -18,7 +18,7 @@ import functest.utils.openstack_clean as os_clean import functest.utils.openstack_snapshot as os_snapshot -class CliOpenStack: +class CliOpenStack(object): def __init__(self): self.os_auth_url = CONST.OS_AUTH_URL diff --git a/functest/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py index b6566245..6644a0c2 100644 --- a/functest/cli/commands/cli_testcase.py +++ b/functest/cli/commands/cli_testcase.py @@ -19,7 +19,7 @@ import functest.utils.functest_utils as ft_utils import functest.utils.functest_vacation as vacation -class CliTestcase: +class CliTestcase(object): def __init__(self): self.tiers = tb.TierBuilder(CONST.INSTALLER_TYPE, diff --git a/functest/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py index b9d25b6d..012b11d0 100644 --- a/functest/cli/commands/cli_tier.py +++ b/functest/cli/commands/cli_tier.py @@ -18,7 +18,7 @@ from functest.utils.constants import CONST import functest.utils.functest_utils as ft_utils -class CliTier: +class CliTier(object): def __init__(self): self.tiers = tb.TierBuilder(CONST.INSTALLER_TYPE, diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index a5309bd4..9d57cfae 100644 --- a/functest/opnfv_tests/openstack/vping/vping_base.py +++ b/functest/opnfv_tests/openstack/vping/vping_base.py @@ -32,6 +32,8 @@ class VPingBase(testcase_base.TestcaseBase): self.image_name = CONST.vping_image_name self.image_filename = CONST.openstack_image_file_name self.image_format = CONST.openstack_image_disk_format + self.image_username = CONST.openstack_image_username + self.image_password = CONST.openstack_image_password self.image_path = os.path.join(CONST.dir_functest_data, self.image_filename) diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py index b032c308..7a58a41f 100755 --- a/functest/opnfv_tests/openstack/vping/vping_ssh.py +++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py @@ -61,8 +61,6 @@ class VPingSSH(vping_base.VPingBase): def establish_ssh(self, vm, floatip): self.logger.info("Trying to establish SSH connection to %s..." % floatip) - username = 'cirros' - password = 'cubswin:)' ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) @@ -73,8 +71,8 @@ class VPingSSH(vping_base.VPingBase): cidr_first_octet = self.private_subnet_cidr.split('.')[0] while timeout > 0: try: - ssh.connect(floatip, username=username, - password=password, timeout=2) + ssh.connect(floatip, username=self.image_username, + password=self.image_password, timeout=2) self.logger.debug("SSH connection established to %s." % floatip) break diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py index 9bff324f..69818f5a 100755 --- a/functest/opnfv_tests/sdn/odl/odl.py +++ b/functest/opnfv_tests/sdn/odl/odl.py @@ -186,7 +186,7 @@ class ODLTests(testcase_base.TestcaseBase): return self.main(suites, **kwargs) -class ODLParser(): +class ODLParser(object): def __init__(self): self.parser = argparse.ArgumentParser() diff --git a/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py b/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py index 090502ba..c2198690 100644 --- a/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py +++ b/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py @@ -10,13 +10,15 @@ from pexpect import pxssh import functest.utils.functest_logger as ft_logger +from functest.utils.constants import CONST + OK = 200 CREATED = 201 ACCEPTED = 202 NO_CONTENT = 204 -class SfcOnos: +class SfcOnos(object): """Defines all the def function of SFC.""" def __init__(self): @@ -99,6 +101,8 @@ class SfcOnos: self.ip_pool = 0 self.vm_public_ip = [] self.vm_public_id = [] + self.cirros_username = CONST.openstack_image_username + self.cirros_password = CONST.openstack_image_password self.net_id1 = 0 self.vm = [] self.address = 0 @@ -628,9 +632,7 @@ class SfcOnos: s = pxssh.pxssh() hostname = self.vm_public_ip[0] - username = "cirros" - password = "cubswin:)" - s.login(hostname, username, password) + s.login(hostname, self.cirros_username, self.cirros_password) s.sendline("ping -c 5 " + str(self.port_ip[2])) s.prompt() # match the prompt @@ -644,9 +646,7 @@ class SfcOnos: def vm1(queue1): s = pxssh.pxssh() hostname = self.vm_public_ip[1] - username = "cirros" - password = "cubswin:)" - s.login(hostname, username, password) + s.login(hostname, self.cirros_username, self.cirros_password) s.sendline('sudo ./firewall') s.prompt() output_pack = s.before diff --git a/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py index bf2c4302..2bef5cc6 100644 --- a/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py +++ b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py @@ -21,7 +21,7 @@ import functest.utils.functest_constants as ft_constants import functest.utils.functest_utils as ft_utils -class Foundation: +class Foundation(object): def __init__(self): diff --git a/functest/opnfv_tests/vnf/ims/clearwater.py b/functest/opnfv_tests/vnf/ims/clearwater.py index eb0abacd..32c6dc5c 100644 --- a/functest/opnfv_tests/vnf/ims/clearwater.py +++ b/functest/opnfv_tests/vnf/ims/clearwater.py @@ -12,7 +12,7 @@ ######################################################################## -class Clearwater: +class Clearwater(object): def __init__(self, inputs={}, orchestrator=None, logger=None): self.config = inputs diff --git a/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py b/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py index 775b71c8..82a9dca0 100644 --- a/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py +++ b/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py @@ -21,7 +21,7 @@ from git import Repo import functest.utils.functest_logger as ft_logger -class Orchestrator: +class Orchestrator(object): def __init__(self, testcase_dir, inputs={}): self.testcase_dir = testcase_dir diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py index 6dc46ef2..022211cb 100755 --- a/functest/utils/functest_logger.py +++ b/functest/utils/functest_logger.py @@ -29,7 +29,7 @@ import json from functest.utils.constants import CONST -class Logger: +class Logger(object): def __init__(self, logger_name): self.setup_logging() |