Adapt netconf device configuration in Netconf CSIT
[integration/test.git] / csit / libraries / TemplatedRequests.robot
index 30b743a65c89e1ae548788ca62cb226a78cfda8f..4f3e7ec7eb0ff02c8de677f38bf1d0734d907cc5 100644 (file)
@@ -64,7 +64,7 @@ Documentation       Resource for supporting http Requests based on data stored i
 ...                 There is a helper Keyword to create the "default" session.
 ...                 The session used is assumed to have most things pre-configured appropriately,
 ...                 which includes auth, host, port and (lack of) base URI.
 ...                 There is a helper Keyword to create the "default" session.
 ...                 The session used is assumed to have most things pre-configured appropriately,
 ...                 which includes auth, host, port and (lack of) base URI.
-...                 It is recommended to have everything past port (for example /restconf) be defined
+...                 It is recommended to have everything past port (for example /rests) be defined
 ...                 not in the session, but in URI data of individual templates.
 ...                 Headers are set in Keywords appropriately. Http session's timout is configurable
 ...                 both on session level (where it becomes a default value for requests) and on request
 ...                 not in the session, but in URI data of individual templates.
 ...                 Headers are set in Keywords appropriately. Http session's timout is configurable
 ...                 both on session level (where it becomes a default value for requests) and on request
@@ -125,6 +125,7 @@ Resource            ${CURDIR}/../variables/Variables.robot
 ...                                 ${201}
 ...                                 ${204}
 ...                                 ${404}
 ...                                 ${201}
 ...                                 ${204}
 ...                                 ${404}
+...                                 ${409}
 # List of integers, not strings. Used by both PUT and DELETE (if the resource should have been present).
 @{ALLOWED_STATUS_CODES}
 ...                                 ${200}
 # List of integers, not strings. Used by both PUT and DELETE (if the resource should have been present).
 @{ALLOWED_STATUS_CODES}
 ...                                 ${200}
@@ -150,7 +151,7 @@ Create_Default_Session
     ...    This Keyword is in this Resource only so that user do not need to call RequestsLibrary directly.
     [Arguments]    ${url}=http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    ${auth}=${AUTH}    ${timeout}=${DEFAULT_TIMEOUT_HTTP}    ${max_retries}=0
     RequestsLibrary.Create_Session
     ...    This Keyword is in this Resource only so that user do not need to call RequestsLibrary directly.
     [Arguments]    ${url}=http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    ${auth}=${AUTH}    ${timeout}=${DEFAULT_TIMEOUT_HTTP}    ${max_retries}=0
     RequestsLibrary.Create_Session
-    ...    alias=default
+    ...    default
     ...    url=${url}
     ...    auth=${auth}
     ...    timeout=${timeout}
     ...    url=${url}
     ...    auth=${auth}
     ...    timeout=${timeout}
@@ -664,11 +665,11 @@ Get_From_Uri
     BuiltIn.Log    ${uri}
     BuiltIn.Log    ${accept}
     IF    """${http_timeout}""" == """${EMPTY}"""
     BuiltIn.Log    ${uri}
     BuiltIn.Log    ${accept}
     IF    """${http_timeout}""" == """${EMPTY}"""
-        ${response} =    RequestsLibrary.Get_On_Session    ${session}    ${uri}    headers=${accept}
+        ${response} =    RequestsLibrary.Get_On_Session    ${session}    url=${uri}    headers=${accept}
     ELSE
         ${response} =    RequestsLibrary.Get_On_Session
         ...    ${session}
     ELSE
         ${response} =    RequestsLibrary.Get_On_Session
         ...    ${session}
-        ...    ${uri}
+        ...    url=${uri}
         ...    headers=${accept}
         ...    timeout=${http_timeout}
     END
         ...    headers=${accept}
         ...    timeout=${http_timeout}
     END