summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2016-09-19 09:49:48 +0200
committerThomas Duval <thomas.duval@orange.com>2016-09-20 10:38:38 +0200
commit8cca39cceea41a6e6a7c266ad994531294b79b0a (patch)
tree7275306c916f663b42123655efa50cb13db3323d
parent486aa04d222b323fab8f8aab459a97c2fcf82e5b (diff)
Bug fixes when calling openstack client.
Change-Id: I902e9f92ec8e6ff0d14d588ca9a7f7d970679c52 (cherry picked from commit a5c4ba26b4dc1883ade7d9639637d7b8cb64d9bb)
-rwxr-xr-xtests/run_tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 6d524122..d94e2e63 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -72,15 +72,15 @@ def test_federation():
logger.info("Create new user ({})".format(proc.stdout.read()))
# Add the role admin to our new user
- proc = subprocess.Popen(["openstack", "role", "add ", "--project", "admin", "--user", username, "admin", "-f", "yaml"], stdout=subprocess.PIPE)
+ proc = subprocess.Popen(["openstack", "role", "add", "--project", "admin", "--user", username, "admin", "-f", "yaml"], stdout=subprocess.PIPE)
logger.info("Add the role admin to our new user ({})".format(proc.stdout.read()))
# Add the sdn tenant
- proc = subprocess.Popen(["openstack", "project", "add ", "sdn", "-f", "yaml"], stdout=subprocess.PIPE)
+ proc = subprocess.Popen(["openstack", "project", "create", "sdn", "-f", "yaml"], stdout=subprocess.PIPE)
logger.info("Add the tenant sdn ({})".format(proc.stdout.read()))
# Add the role admin to test_fede in tenant sdn
- proc = subprocess.Popen(["openstack", "role", "add ", "--project", "sdn", "--user", username, "admin", "-f", "yaml"], stdout=subprocess.PIPE)
+ proc = subprocess.Popen(["openstack", "role", "add", "--project", "sdn", "--user", username, "admin", "-f", "yaml"], stdout=subprocess.PIPE)
logger.info("Add the role admin for the user test_fede in the tenant sdn ({})".format(proc.stdout.read()))
# Retrieve Moon token
@@ -163,7 +163,7 @@ def main():
details)
logger.info("Moon results pushed to DB")
- if result_os != 0 or not result_odl[0]:
+ if result_os[0] != 0 or not result_odl[0]:
return False
return True