cleaning up system variables
[integration/test.git] / csit / suites / aaa / idmlite / 010_CRUD_Rest_CommandsTests.robot
index a3e3cd2b8e63315e56b2786715a3d4e526075162..09f8b0430fb57153588b083e884f8f8cb441822f 100644 (file)
@@ -22,7 +22,7 @@ Resource          ../../../libraries/AAAKeywords.robot
 
 *** Variables ***
 # port is fixed in Jetty configuration, as well
-${URI}            http://${CONTROLLER}:8282
+${URI}            http://${ODL_SYSTEM_IP}:8282
 # create lists for Domains, Roles and Users - that can be cleaned up upon Teardown
 @{cleanup_domain_list}
 @{cleanup_role_list}
@@ -481,7 +481,7 @@ Check Specific Id Does Not Exist
     # the ITEM is the area to look under...    users, domains, roles, etc
     ${n1}=    Set Variable    auth/v1/${area_to_look}/${id}
     # do the actual get
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    404
     ${id_string}=    Convert To String    ${id}
     Should Contain    ${resp.content}    ${id_string}
@@ -491,7 +491,7 @@ Get Specific Domain
     [Arguments]    ${domainid}
     [Documentation]    Execute GET command on specified single domain
     ${n1}=    Set Variable    auth/v1/domains/${domainid}
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
     ${domainid_string}=    Convert To String    ${domainid}
     Should Contain    ${resp.content}    ${domainid_string}
@@ -501,7 +501,7 @@ Get Specific Domain Name
     [Arguments]    ${domainid}
     [Documentation]    Execute GET command on specified single domain
     ${n1}=    Set Variable    auth/v1/domains/${domainid}
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Contain    ${resp.content}    ${domainid}
     Log    ${resp.content}
     [Return]    ${resp.content}
@@ -510,7 +510,7 @@ Get Specific Role
     [Arguments]    ${roleid}
     [Documentation]    Exercise REST command to GET a specific role, based on role-id
     ${n1}=    Set Variable    auth/v1/roles/${roleid}
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${roleid}
     [Return]    ${resp.content}
@@ -518,7 +518,7 @@ Get Specific Role
 Get Domains
     [Documentation]    Execute getdomains GET command.
     ${n1}=    Set Variable    auth/v1/domains
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    "domains"
     [Return]    ${resp.content}
@@ -526,7 +526,7 @@ Get Domains
 Get Roles
     [Documentation]    Execute GET command to obtain list of roles.
     ${n1}=    Set Variable    auth/v1/roles
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    "roles"
     [Return]    ${resp.content}
@@ -535,7 +535,7 @@ Get Specific User
     [Arguments]    ${user}
     [Documentation]    Exercise REST command for users GET command.
     ${n1}=    Set Variable    auth/v1/users/${user}
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${user}
     [Return]    ${resp.content}
@@ -543,7 +543,7 @@ Get Specific User
 Get Users
     [Documentation]    GET the complete set of users.
     ${n1}=    Set Variable    auth/v1/users
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
     Should Contain    ${resp.content}    ${user}
     [Return]    ${resp.content}
@@ -552,7 +552,7 @@ Post New Domain
     [Arguments]    ${domain}    ${data}
     [Documentation]    Exercise REST command for domains POST command.
     ${n1}=    Set Variable    auth/v1/domains
-    ${resp}    RequestsLibrary.Post    httpbin    ${n1}    headers=${HEADERS}    data=${data}
+    ${resp}    RequestsLibrary.Post Request    httpbin    ${n1}    headers=${HEADERS}    data=${data}
     Should Be Equal As Strings    ${resp.status_code}    201
     Should Contain    ${resp.content}    ${domain}
     [Return]    ${resp.content}
@@ -561,7 +561,7 @@ Post New Role
     [Arguments]    ${data}
     [Documentation]    Use POST REST command to create specified Role.
     ${n1}=    Set Variable    auth/v1/roles
-    ${resp}    RequestsLibrary.Post    httpbin    ${n1}    headers=${HEADERS}    data=${data}
+    ${resp}    RequestsLibrary.Post Request    httpbin    ${n1}    headers=${HEADERS}    data=${data}
     #    HTTP/1.1 201 Created
     Should Be Equal As Strings    ${resp.status_code}    201
     [Return]    ${resp.content}
@@ -570,7 +570,7 @@ Post New User
     [Arguments]    ${username}    ${data}
     [Documentation]    Exercise REST command for users POST command.
     ${n1}=    Set Variable    auth/v1/users
-    ${resp}    RequestsLibrary.Post    httpbin    ${n1}    headers=${HEADERS}    data=${data}
+    ${resp}    RequestsLibrary.Post Request    httpbin    ${n1}    headers=${HEADERS}    data=${data}
     # grab the list of users, count the list, and then search the list for the specific user id
     ${users}=    Get Users
     ${depth}=    Nodecount    ${users}    users    userid
@@ -589,7 +589,7 @@ Update Specific Domain
     [Arguments]    ${data}    ${domainid}
     [Documentation]    Update the specified domainid with a new name specified in domain-name
     ${n1}=    Set Variable    auth/v1/domains/${domainid}
-    ${resp}    RequestsLibrary.Put    httpbin    ${n1}    headers=${HEADERS}    data=${data}
+    ${resp}    RequestsLibrary.Put Request    httpbin    ${n1}    headers=${HEADERS}    data=${data}
     # Should Be Equal As Strings    ${resp.status_code}    201
     Log    ${resp.content}
 
@@ -597,7 +597,7 @@ Update Specific Role
     [Arguments]    ${data}    ${roleid}
     [Documentation]    Update the specified roleid with a new information name specified
     ${n1}=    Set Variable    auth/v1/roles/${roleid}
-    ${resp}    RequestsLibrary.Put    httpbin    ${n1}    headers=${HEADERS}    data=${data}
+    ${resp}    RequestsLibrary.Put Request    httpbin    ${n1}    headers=${HEADERS}    data=${data}
     # Should Be Equal As Strings    ${resp.status_code}    201
     Log    ${resp.content}
 
@@ -605,7 +605,7 @@ Update Specific User
     [Arguments]    ${data}    ${userid}
     [Documentation]    Update the specified userid with a new information name specified
     ${n1}=    Set Variable    auth/v1/users/${userid}
-    ${resp}    RequestsLibrary.Put    httpbin    ${n1}    headers=${HEADERS}    data=${data}
+    ${resp}    RequestsLibrary.Put Request    httpbin    ${n1}    headers=${HEADERS}    data=${data}
     # Should Be Equal As Strings    ${resp.status_code}    201
     Log    ${resp.content}
 
@@ -614,7 +614,7 @@ Delete Domain
     [Documentation]    Delete the specified domain, by id
     ${n1}=    Set Variable    auth/v1/domains/${domainid}
     Log    ${n1}
-    ${resp}    RequestsLibrary.Delete    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Delete Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    204
     Log    ${resp.content}
 
@@ -622,7 +622,7 @@ Delete User
     [Arguments]    ${userid}
     [Documentation]    Delete the specified user, by id
     ${n1}=    Set Variable    auth/v1/users/${userid}
-    ${resp}    RequestsLibrary.Delete    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Delete Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    204
     Log    ${resp.content}
 
@@ -630,7 +630,7 @@ Delete Role
     [Arguments]    ${roleid}
     [Documentation]    Use DELETE REST command to wipe out a Role created for testing.
     ${n1}=    Set Variable    auth/v1/roles/${roleid}
-    ${resp}    RequestsLibrary.Delete    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Delete Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    204
     #Should NOT Contain    ${resp.content}    ${roleid}
     [Return]    ${resp.content}
@@ -640,7 +640,7 @@ Post Role To Domain And User
     [Documentation]    Exercise REST POST command for posting a role to particular domain and user
     ${n1}=    Set Variable    auth/v1/domains/${domainid}/users/${userid}/roles
     # now post it
-    ${resp}    RequestsLibrary.Post    httpbin    ${n1}    headers=${HEADERS}    data=${data}
+    ${resp}    RequestsLibrary.Post Request    httpbin    ${n1}    headers=${HEADERS}    data=${data}
     Should Be Equal As Strings    ${resp.status_code}    201
     [Return]    ${resp.content}
 
@@ -649,7 +649,7 @@ Get Roles For Specific Domain And User
     [Documentation]    Exercise REST GET command for roles in a specific domain and user
     ${n1}=    Set Variable    auth/v1/domains/${domainid}/users/${userid}/roles
     # now get it
-    ${resp}    RequestsLibrary.Get    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Get Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    200
     [Return]    ${resp.content}
 
@@ -658,7 +658,7 @@ Delete Specific Grant
     [Documentation]    Exercise REST DELETE command for a grant by roleid
     ${n1}=    Set Variable    auth/v1/domains/${domainid}/users/${userid}/roles/${roleid}
     # now delete it
-    ${resp}    RequestsLibrary.Delete    httpbin    ${n1}    headers=${HEADERS}
+    ${resp}    RequestsLibrary.Delete Request    httpbin    ${n1}    headers=${HEADERS}
     Should Be Equal As Strings    ${resp.status_code}    204
     [Return]    ${resp.content}