aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/sdn
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/sdn
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/sdn')
-rw-r--r--functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py b/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py
index 090502ba..fadaa478 100644
--- a/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py
+++ b/functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py
@@ -10,6 +10,8 @@ from pexpect import pxssh
import functest.utils.functest_logger as ft_logger
+from functest.utils.constants import CONST
+
OK = 200
CREATED = 201
ACCEPTED = 202
@@ -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