Step 1: Move vm scripts to the right place
[integration/test.git] / test / csit / suites / openflowplugin / Flows_Additional_TCs / 010_Lithium_Rps_Calls_Ovs.robot
1 *** Settings ***
2 Documentation     Test suite to test various rcp calls
3 Suite Setup       Initialization Phase
4 Suite Teardown    Final Phase
5 Library           XML
6 Library           RequestsLibrary
7 Library           SSHLibrary
8 Resource          ../../../libraries/Utils.robot
9 Variables         ../../../variables/ofplugin/RpcVariables.py
10
11 *** Variables ***
12 ${send_barrier_url}    /restconf/operations/flow-capable-transaction:send-barrier
13 ${send_echo_url}    /restconf/operations/sal-echo:send-echo
14
15 *** Test Cases ***
16 Sending Barrier
17     [Documentation]    Test to send barrier
18     ${resp}=    RequestsLibrary.Post    session    ${send_barrier_url}    data=${RPC_SEND_BARRIER_DATA}    headers=${HEADERS_XML}
19     Log    ${resp.content}
20     Should Be Equal As Strings    ${resp.status_code}    200
21
22 Sending Echo
23     [Documentation]    Test to send echo
24     ${resp}=    RequestsLibrary.Post    session    ${send_echo_url}    data=${RPC_SEND_ECHO_DATA}    headers=${HEADERS_XML}
25     Log    ${resp.content}
26     Should Be Equal As Strings    ${resp.status_code}    200
27
28 *** Keywords ***
29 Initialization Phase
30     [Documentation]    Starts mininet and verify if topology is in operational ds
31     Start Suite
32     Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
33     Wait Until Keyword Succeeds    10s    1s    Are Switches Connected Topo
34
35 Final Phase
36     [Documentation]    Stops mininet
37     Stop Suite
38     Delete All Sessions
39
40 Are Switches Connected Topo
41     [Documentation]    Checks wheather switches are connected to controller
42     ${resp}=    RequestsLibrary.Get    session    ${OPERATIONAL_TOPO_API}/topology/flow:1    headers=${ACCEPT_XML}
43     Log    ${resp.content}
44     ${count}=    Get Element Count    ${resp.content}    xpath=node
45     Should Be Equal As Numbers    ${count}    1