aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py9
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_utils.py5
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_ssh.py10
3 files changed, 11 insertions, 13 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
index 216d9acf..34d56f70 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
@@ -38,13 +38,12 @@ class SnapsTestRunner(unit.Suite):
self.netconf_override = None
if hasattr(CONST, 'snaps_network_config'):
- self.netconf_override = CONST.__getattribute__(
- 'snaps_network_config')
+ self.netconf_override = getattr(CONST, 'snaps_network_config')
self.use_fip = (
- CONST.__getattribute__('snaps_use_floating_ips') == 'True')
+ getattr(CONST, 'snaps_use_floating_ips') == 'True')
self.use_keystone = (
- CONST.__getattribute__('snaps_use_keystone') == 'True')
+ getattr(CONST, 'snaps_use_keystone') == 'True')
scenario = env.get('DEPLOY_SCENARIO')
self.flavor_metadata = None
@@ -55,4 +54,4 @@ class SnapsTestRunner(unit.Suite):
self.image_metadata = None
if hasattr(CONST, 'snaps_images'):
- self.image_metadata = CONST.__getattribute__('snaps_images')
+ self.image_metadata = getattr(CONST, 'snaps_images')
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_utils.py b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
index 59bd063c..4b1c9352 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_utils.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
@@ -53,10 +53,9 @@ def get_credentials(proxy_settings_str=None, ssh_proxy_cmd=None):
"""
creds_override = None
if hasattr(CONST, 'snaps_os_creds_override'):
- creds_override = CONST.__getattribute__(
- 'snaps_os_creds_override')
+ creds_override = getattr(CONST, 'snaps_os_creds_override')
os_creds = openstack_tests.get_credentials(
- os_env_file=CONST.__getattribute__('env_file'),
+ os_env_file=getattr(CONST, 'env_file'),
proxy_settings_str=proxy_settings_str, ssh_proxy_cmd=ssh_proxy_cmd,
overrides=creds_override)
return os_creds
diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py
index 57e177e5..0964d846 100644
--- a/functest/opnfv_tests/openstack/vping/vping_ssh.py
+++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py
@@ -42,11 +42,11 @@ class VPingSSH(vping_base.VPingBase):
kwargs["case_name"] = "vping_ssh"
super(VPingSSH, self).__init__(**kwargs)
- self.kp_name = CONST.__getattribute__('vping_keypair_name') + self.guid
- self.kp_priv_file = CONST.__getattribute__('vping_keypair_priv_file')
- self.kp_pub_file = CONST.__getattribute__('vping_keypair_pub_file')
- self.sg_name = CONST.__getattribute__('vping_sg_name') + self.guid
- self.sg_desc = CONST.__getattribute__('vping_sg_desc')
+ self.kp_name = getattr(CONST, 'vping_keypair_name') + self.guid
+ self.kp_priv_file = getattr(CONST, 'vping_keypair_priv_file')
+ self.kp_pub_file = getattr(CONST, 'vping_keypair_pub_file')
+ self.sg_name = getattr(CONST, 'vping_sg_name') + self.guid
+ self.sg_desc = getattr(CONST, 'vping_sg_desc')
@energy.enable_recording
def run(self, **kwargs):