5873f031f2bc167d066c3bbb6d8429986198f1a6
[integration/test.git] / csit / suites / ocpplugin / basic / 010__ocp_get.robot
1 *** Settings ***
2 Documentation     Test suite for OCPPLUGIN
3 Suite Setup       Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
4 Suite Teardown    Delete All Sessions
5 Library           SSHLibrary
6 Library           Collections
7 Library           RequestsLibrary
8 Library           ../../../libraries/Common.py
9 Library           ../../../libraries/Topology.py
10 Resource          ../../../libraries/Utils.robot
11 Resource          ../../../libraries/OcpAgentKeywords.robot
12 Variables         ../../../variables/Variables.py
13
14 *** Variables ***
15 ${NODE_ID}        /restconf/operational/opendaylight-inventory:nodes/node/ocp:
16 ${REST_GET_PARAM}    /restconf/operations/ocp-service:get-param-nb
17
18 *** Test Cases ***
19 Check if node exist
20     [Documentation]    get inventory node
21     [Tags]    get node
22     OcpAgentKeywords.Install Agent
23     ${mininet_conn_id}=    OcpAgentKeywords.Start Emulator Single
24     ${resp}    Get Request    session    ${NODE_ID}TST-100
25     Should Be Equal As Strings    ${resp.status_code}    200
26
27 Get param from emulator
28     [Documentation]    OCPPLUGIN get param
29     [Tags]    OCPPLUGIN get
30     ${resp}    Post Request    session    ${REST_GET_PARAM}    data={"input":{"nodeId":"ocp:TST-100","obj":[{"id":"ALL","param":[{"name":"ALL"}]}]}}
31     Should Be Equal As Strings    ${resp.status_code}    200
32     Stop Emulator And Exit    ${mininet_conn_id}