aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/vping
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-02-23 00:57:36 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-02-23 00:59:46 +0100
commit43ad2cfc1a4861a7020ffa6537fa693309ec164e (patch)
tree485b226fd4b4b02141dbd055869cfbea00fcedb6 /functest/opnfv_tests/openstack/vping
parent03208634b25e61faebaa34e932e282a8f26c0ea4 (diff)
WIP: Cirros TestVM: Allow config of username/password
With the recent changes in Cirros image default password, we need to support configuring these credentials. JIRA: ARMBAND-218 Change-Id: I5962ec2aeee4ffecefdd8b7e70bdb7ed88457553 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/vping')
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_base.py2
-rwxr-xr-xfunctest/opnfv_tests/openstack/vping/vping_ssh.py6
2 files changed, 4 insertions, 4 deletions
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