aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2016-08-01 14:46:23 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-01 14:46:23 +0000
commit6d655178e74054c18b373a3bf98e6508f136061d (patch)
treeb7f4fae14a05a63389e6d0901a788083ef6c145b /testcases/features
parentbb3419f192cafe4090753e5568f1e14071069dd2 (diff)
parent7076c6c1943b60e3fefffc9941f9ae36be394727 (diff)
Merge "Several bug fixes in ODL-SFC functest testcase"
Diffstat (limited to 'testcases/features')
-rwxr-xr-xtestcases/features/sfc/server_presetup_CI.bash1
-rwxr-xr-xtestcases/features/sfc/sfc.py41
2 files changed, 23 insertions, 19 deletions
diff --git a/testcases/features/sfc/server_presetup_CI.bash b/testcases/features/sfc/server_presetup_CI.bash
index 785e7a7fc..f959ced5b 100755
--- a/testcases/features/sfc/server_presetup_CI.bash
+++ b/testcases/features/sfc/server_presetup_CI.bash
@@ -4,6 +4,7 @@ ssh_options='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
BASEDIR=`dirname $0`
INSTALLER_IP=${INSTALLER_IP:-10.20.0.2}
+pushd $BASEDIR
ip=`sshpass -p r00tme ssh $ssh_options root@${INSTALLER_IP} 'fuel node'|grep controller|awk '{print $10}' | head -1`
echo $ip
sshpass -p r00tme scp $ssh_options set-up-tacker.sh ${INSTALLER_IP}:/root
diff --git a/testcases/features/sfc/sfc.py b/testcases/features/sfc/sfc.py
index ad724dcac..511b5936b 100755
--- a/testcases/features/sfc/sfc.py
+++ b/testcases/features/sfc/sfc.py
@@ -53,6 +53,28 @@ TACKER_CHANGECLASSI = "sfc_change_classi.bash"
def main():
+ # Allow any port so that tacker commands reaches the server.
+ # This will be deleted when tacker is included in OPNFV installation
+
+ ssh_options = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+ contr_cmd = ("sshpass -p r00tme ssh " + ssh_options + " root@10.20.0.2"
+ " 'fuel node'|grep controller|awk '{print $10}'")
+ logger.info("Executing tacker script: '%s'" % contr_cmd)
+ process = subprocess.Popen(contr_cmd,
+ shell=True,
+ stdout=subprocess.PIPE)
+ ip = process.stdout.readline().rstrip()
+
+ iptable_cmd1 = ("sshpass -p r00tme ssh " + ssh_options + " root@10.20.0.2"
+ " ssh " + ip + " iptables -P INPUT ACCEPT ")
+ iptable_cmd2 = ("sshpass -p r00tme ssh " + ssh_options + " root@10.20.0.2"
+ " ssh " + ip + " iptables -t nat -P INPUT ACCEPT ")
+
+ subprocess.call(iptable_cmd1, shell=True)
+ subprocess.call(iptable_cmd2, shell=True)
+
+# Getting the different clients
+
nova_client = os_utils.get_nova_client()
neutron_client = os_utils.get_neutron_client()
glance_client = os_utils.get_glance_client()
@@ -67,25 +89,6 @@ def main():
else:
logger.info("Using old image")
-# Allow any port so that tacker commands reaches the server.
-# CHECK IF THIS STILL MAKES SENSE WHEN TACKER IS INCLUDED IN OPNFV INSTALATION
-
- controller_command = ("sshpass -p r00tme ssh root@10.20.0.2"
- " 'fuel node'|grep controller|awk '{print $10}'")
- logger.info("Executing tacker script: '%s'" % controller_command)
- process = subprocess.Popen(controller_command,
- shell=True,
- stdout=subprocess.PIPE)
- ip = process.stdout.readline()
-
- iptable_command1 = ("sshpass -p r00tme ssh root@10.20.0.2 ssh"
- " " + ip + " iptables -P INPUT ACCEPT ")
- iptable_command2 = ("sshpass -p r00tme ssh root@10.20.0.2 ssh"
- " " + ip + " iptables -t nat -P INPUT ACCEPT ")
-
- subprocess.call(iptable_command1, shell=True)
- subprocess.call(iptable_command2, shell=True)
-
# Create glance image and the neutron network
image_id = os_utils.create_glance_image(glance_client,