Moved calls to "RequestLibrary.<action> Request" in suites/aaa/ 15/34215/2
authorJunaid Zulfiqar <junaid.rao21@gmail.com>
Sat, 6 Feb 2016 19:37:26 +0000 (11:37 -0800)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 8 Feb 2016 19:05:21 +0000 (19:05 +0000)
+ RequestsLibrary.Get Request
+ RequestsLibrary.Post Request
+ RequestsLibrary.Delete Request
+ RequestsLibrary.GET Request
+ RequestsLibrary.Put Request

Change-Id: I13d83ce842e361f6c97a70ae06188b596a6c9d09
Signed-off-by: Junaid Zulfiqar <junaid.rao21@gmail.com>
csit/suites/aaa/authn/010_Credential_Authentication.robot
csit/suites/aaa/idmlite/010_CRUD_Rest_CommandsTests.robot

index a91d615396dd39f42e88c1112c51bae9aa49917e..62eba2c8ea290e6a0be3b4695160dce80b29b161 100644 (file)
@@ -71,6 +71,6 @@ Make REST Transaction
     Create Session    ODL_SESSION    http://${ODL_SYSTEM_IP}:8181
     ${headers}=    Create Dictionary    Content-Type=application/x-www-form-urlencoded
     Run Keyword If    "${auth_data}" != "${EMPTY}"    Set To Dictionary    ${headers}    Authorization    Bearer ${auth_data}
-    ${resp}=    RequestsLibrary.GET    ODL_SESSION    ${MODULES_API}    headers=${headers}
+    ${resp}=    RequestsLibrary.GET Request    ODL_SESSION    ${MODULES_API}    headers=${headers}
     Log    STATUS_CODE: ${resp.status_code} CONTENT: ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    ${expected_status_code}
index a3e3cd2b8e63315e56b2786715a3d4e526075162..775a8cbe62266bb638ecad9f1283354685304871 100644 (file)
@@ -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}