summaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ODL
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2016-07-11 10:13:09 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2016-07-13 12:20:37 +0200
commitc32d05b2c25438997feda781151a4bd09f94cf03 (patch)
tree9eb8e51e77668419941d15e8244c39c692bddce7 /testcases/Controllers/ODL
parent8a86b1f06579b6c294e768d937ea2e18903920e2 (diff)
Enhance ips, ports and creds management
It follows the next ODL patch [1] which splits Keystone and Neutron IPs in Robotframework files. It also adds ODL creds, ODL ports and tenant name as inputs. Classical default values are also used now. [1] https://git.opendaylight.org/gerrit/#/c/41554/ Change-Id: I867f1d4c003c4b96a5d4c3e2f982b5a0e3139217 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'testcases/Controllers/ODL')
-rwxr-xr-xtestcases/Controllers/ODL/start_tests.sh27
1 files changed, 19 insertions, 8 deletions
diff --git a/testcases/Controllers/ODL/start_tests.sh b/testcases/Controllers/ODL/start_tests.sh
index 2e1805312..01c8553ea 100755
--- a/testcases/Controllers/ODL/start_tests.sh
+++ b/testcases/Controllers/ODL/start_tests.sh
@@ -25,7 +25,7 @@ usage:
where:
-h show this help text
- var one of the following: ODL_IP, ODL_PORT, USR_NAME, PASS, NEUTRON_IP
+ var one of the following: ODL_IP, ODL_WEB_PORT, ODL_RESTCONF_PORT, ODL_USER, ODL_PASS, TENANT_NAME, USR_NAME, PASS, NEUTRON_IP, KEYSTONE_IP
value new value for var
example:
@@ -46,14 +46,22 @@ done
echo -e "${green}Current environment parameters for ODL suite.${nc}"
# Following vars might be also specified as CLI params
set -x
-ODL_IP=${ODL_IP:-'192.168.1.5'}
-ODL_PORT=${ODL_PORT:-8081}
-USR_NAME=${USR_NAME:-'neutron'}
-PASS=${PASS:-'octopus'}
-NEUTRON_IP=${NEUTRON_IP:-192.168.0.68}
-KEYSTONE_IP=${KEYSTONE_IP:-192.168.0.69}
+ODL_IP=${ODL_IP:-'127.0.0.1'}
+ODL_WEB_PORT=${ODL_WEB_PORT:-8080}
+ODL_RESTCONF_PORT=${ODL_RESTCONF_PORT:-8181}
+ODL_USER=${ODL_USER:-'admin'}
+ODL_PASS=${ODL_PASS:-'admin'}
+TENANT_NAME=${TENANT_NAME:-'admin'}
+USR_NAME=${USR_NAME:-'admin'}
+PASS=${PASS:-'admin'}
+NEUTRON_IP=${NEUTRON_IP:-'127.0.0.1'}
+KEYSTONE_IP=${KEYSTONE_IP:-'127.0.0.1'}
set +x
+# set ODL credentials in ${REPO_DIR}/csit/variables/Variables.py
+sed -i "s/^AUTH\ =.*$/AUTH\ =\ [u'$ODL_USER', u'$ODL_PASS']/" \
+ ${REPO_DIR}/csit/variables/Variables.py
+
# add custom tests to suite, if there are more custom tests needed this will be reworked
echo -e "${green}Copy custom tests to suite.${nc}"
cp -vf ${BASEDIR}/custom_tests/neutron/* ${REPO_DIR}/csit/suites/openstack/neutron/
@@ -71,7 +79,10 @@ do
((test_num++))
echo -e "${light_green}Starting test: $line ${nc}"
- pybot -v OPENSTACK:${NEUTRON_IP} -v PORT:${ODL_PORT} -v ODL_SYSTEM_IP:${ODL_IP} -v OSPASSWORD:\"${PASS}\" ${REPO_DIR}/$line
+ pybot -v KEYSTONE:${KEYSTONE_IP} -v NEUTRON:${NEUTRON_IP} \
+ -v OSUSERNAME:\"${USR_NAME}\" -v OSTENANTNAME:\"${TENANT_NAME}\" -v OSPASSWORD:\"${PASS}\" \
+ -v PORT:${ODL_WEB_PORT} -v RESTCONFPORT:${ODL_RESTCONF_PORT} -v ODL_SYSTEM_IP:${ODL_IP} \
+ ${REPO_DIR}/$line
mkdir -p $RESULTS_DIR/logs/${test_num}
mv log.html $RESULTS_DIR/logs/${test_num}/
mv report.html $RESULTS_DIR/logs/${test_num}/