Library Collections
Library RequestsLibrary
Library OperatingSystem
-Library HttpLibrary.HTTP
+# Library HttpLibrary.HTTP
*** Keywords ***
Create SDNC RESTCONF Session
${body}= Get File ${path}
&{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
- ${resp}= POST On Session sdnc_restconf ${url} headers=${headers} data=${body} expected_status=200
- ${respjson}= Parse Json ${resp.content}
- Should Be Equal As Strings ${respjson['output']['response-code']} ${resp_code}
+ ${resp}= POST On Session sdnc_restconf ${url} headers=${headers} data=${body} expected_status=${resp_code}
Send Empty Post Request And Validate Response
${mount}= Get File ${REQUEST_DATA_PATH}${/}mount.xml
&{headers}= Create Dictionary Content-Type=application/xml Accept=application/xml
${resp}= PUT On Session sdnc_restconf ${url} data=${mount} headers=${headers} expected_status=201
- Sleep 30
+ Sleep 120
&{headers1}= Create Dictionary Content-Type=application/json Accept=application/json
${resp1}= GET On Session sdnc_restconf ${PNFSIM_MOUNT_PATH} headers=${headers1} expected_status=${resp_code}