Migrate Get Requests invocations(libraries)
[integration/test.git] / csit / suites / openflowplugin / Flows_Additional_TCs / 020_Lithium_Rps_Calls_Cpqd.robot
1 *** Settings ***
2 Documentation       Test suite to test various rcp calls
3
4 Library             XML
5 Library             RequestsLibrary
6 Library             SSHLibrary
7 Resource            ../../../libraries/Utils.robot
8 Resource            ../../../libraries/FlowLib.robot
9 Variables           ../../../variables/ofplugin/RpcVariables.py
10
11 Suite Setup         Initialization Phase
12 Suite Teardown      Final Phase
13
14
15 *** Variables ***
16 ${send_update_table_url}    /rests/operations/sal-table:update-table
17 ${start}                    sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch user
18
19
20 *** Test Cases ***
21 Sending Update Table
22     [Documentation]    Test to send table update request
23     ${resp}=    RequestsLibrary.POST On Session
24     ...    session
25     ...    url=${send_update_table_url}
26     ...    data=${RPC_SEND_UPDATE_TABLE_DATA}
27     ...    headers=${HEADERS_XML}
28     ...    expected_status=200
29     Log    ${resp.content}
30
31
32 *** Keywords ***
33 Initialization Phase
34     [Documentation]    Starts mininet and verify if topology is in operational ds
35     Start Mininet
36     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
37     Wait Until Keyword Succeeds    90s    1s    FlowLib.Check Switches In Topology    1
38
39 Final Phase
40     [Documentation]    Stops mininet
41     Stop Mininet
42     Delete All Sessions