2 Documentation Test suite for NETCONF client
5 Library OperatingSystem
7 Library RequestsLibrary
8 Library ../../../libraries/Common.py
9 Variables ../../../variables/Variables.py
11 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
12 Suite Teardown Delete All Sessions
16 ${NETOPEER} ${TOOLS_SYSTEM_IP}
17 ${NETOPEER_USER} ${TOOLS_SYSTEM_USER}
18 ${FILE} ${CURDIR}/../../../variables/xmls/netconf.xml
19 ${REST_CONT_CONF} /restconf/config/network-topology:network-topology/topology/topology-netconf
20 ${REST_CONT_OPER} /restconf/operational/network-topology:network-topology/topology/topology-netconf
21 ${REST_NTPR_CONF} node/controller-config/yang-ext:mount/config:modules
22 ${REST_NTPR_MOUNT} node/netopeer/yang-ext:mount/
27 [Documentation] Add NetConf device using REST
29 ${XML1} Get File ${FILE}
30 ${XML2} Replace String ${XML1} 127.0.0.1 ${NETOPEER}
31 ${body} Replace String ${XML2} mininet ${NETOPEER_USER}
33 ${resp} Post Request session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body}
35 Should Be Equal As Strings ${resp.status_code} 204
37 Get Controller Inventory
38 [Documentation] Get Controller operational inventory
40 Wait Until Keyword Succeeds 30s 2s Get Inventory
42 Pull External Device configuration
43 [Documentation] Pull Netopeer configuration
45 ${resp} Get Request session ${REST_CONT_CONF}/${REST_NTPR_MOUNT}
47 Should Be Equal As Strings ${resp.status_code} 200
48 Should Contain ${resp.content} {}
50 Verify Device Operational data
51 [Documentation] Verify Netopeer operational data
53 ${resp} Get Request session ${REST_CONT_OPER}/${REST_NTPR_MOUNT}
55 Should Be Equal As Strings ${resp.status_code} 200
56 Should Contain ${resp.content} schema
57 Should Contain ${resp.content} statistics
58 Should Contain ${resp.content} datastores
63 ${resp} Get Request session ${REST_CONT_OPER}/node/netopeer
65 Should Be Equal As Strings ${resp.status_code} 200
66 Should Contain ${resp.content} "node-id":"netopeer"
67 Should Contain ${resp.content} "netconf-node-topology:connection-status":"connected"
68 Should Contain ${resp.content} "netconf-node-topology:available-capabilities"