Change return code checker to be more clear
[integration/test.git] / csit / libraries / AAA / DockerKeystone.robot
index 48f302387ba0e5d8e16edba6f4591184357e7925..659ba49c7e0f1b90be03e2af7e1ca4d3359ec99b 100644 (file)
@@ -6,6 +6,7 @@ Documentation     DockerKeystone library. This library is useful to deal with Op
 ...               - Start/Stop keystone node in SYSTEM TOOLS VM:
 ...               - Run Docker Keystone
 ...               - Destroy Docker Keystone
+...               - Check Keystone Log File For String
 ...
 ...               - Provision keystone node:
 ...               - Create Keystone session
@@ -82,12 +83,12 @@ Get Admin Role Id
 Run Docker Keystone
     [Documentation]    Run Keystone in a docker container hosted in the SYSTEM TOOL server and define "CSC_user" and "CSC_user_no_admin" users, the former with "admin" role and the latter with "user" role
     ${output}    SSHLibrary.Open_Connection    ${TOOLS_SYSTEM_IP}    timeout=20s
-    Utils.Flexible_Controller_Login
+    SSHKeywords.Flexible_Controller_Login
     SSHLibrary.Put File    ${CURDIR}/../../suites/aaa/keystone/start_keystone.sh
     SSHLibrary.Execute Command    ./start_keystone.sh
     Wait Until Keyword Succeeds    10x    15    Check Keystone Log File For String    GET
     SSHLibrary.Execute Command    docker exec -t keystone bash -c "source openrc;openstack user create --password cscuser CSC_user;openstack user set --project admin CSC_user;openstack role add --project admin --user CSC_user admin;openstack role add --domain default --user CSC_user admin;openstack user list"
-    SSHLibrary.Execute Command    docker exec -t keystone bash -c "source openrc;openstack user create --password cscusernoadmin CSC_user_no_admin;openstack user set --project admin CSC_user_no_admin;openstack role add --project admin --user CSC_user_no_admin user;openstack user list"
+    SSHLibrary.Execute Command    docker exec -t keystone bash -c "source openrc;openstack user create --password cscusernoadmin CSC_user_no_admin;openstack user set --project admin CSC_user_no_admin;openstack role add --project admin --user CSC_user_no_admin user;openstack role add --domain default --user CSC_user_no_admin user"
     [Return]    ${output}
 
 Destroy Docker Keystone
@@ -128,6 +129,7 @@ Set Keystone Certificate into ODL
 
 Check Keystone Log File For String
     [Arguments]    ${string}
+    [Documentation]    Check provided log exists in /var/log/nginx-access.log
     ${status}    SSHLibrary.Execute Command    docker exec -t keystone bash -c "grep ${string} /var/log/nginx-access.log"
     Log    ${status}
     BuiltIn.Should Contain    ${status}    ${string}