2 Documentation Test suite for NETCONF client
3 ... FIXME: this test suite is based on the config subsystem, which has been long gone.
4 ... Currently this test suite is not used and hence should be fixed when added back.
7 Library OperatingSystem
8 Library RequestsLibrary
10 Library ../../../libraries/Common.py
11 Variables ../../../variables/Variables.py
13 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
14 Suite Teardown Delete All Sessions
18 ${NETOPEER} ${TOOLS_SYSTEM_IP}
19 ${NETOPEER_USER} ${TOOLS_SYSTEM_USER}
20 ${FILE} ${CURDIR}/../../../variables/xmls/netconf.xml
21 ${REST_TOPOLOGY_NETCONF} /rests/data/network-topology:network-topology/topology=topology-netconf
22 ${REST_NTPR_CONF} node=controller-config/yang-ext:mount/config:modules
23 ${REST_NTPR_MOUNT} node=netopeer/yang-ext:mount
28 [Documentation] Add NetConf device using REST
30 ${XML1} Get File ${FILE}
31 ${XML2} Replace String ${XML1} 127.0.0.1 ${NETOPEER}
32 ${body} Replace String ${XML2} mininet ${NETOPEER_USER}
34 ${resp} RequestsLibrary.POST On Session
36 ... url=${REST_TOPOLOGY_NETCONF}/${REST_NTPR_CONF}
38 ... expected_status=204
41 Get Controller Inventory
42 [Documentation] Get Controller operational inventory
44 Wait Until Keyword Succeeds 30s 2s Get Inventory
46 Pull External Device configuration
47 [Documentation] Pull Netopeer configuration
49 ${resp} RequestsLibrary.GET On Session
51 ... url=${REST_TOPOLOGY_NETCONF}/${REST_NTPR_MOUNT}?content=config
52 ... expected_status=200
54 Should Contain ${resp.content} {}
56 Verify Device Operational data
57 [Documentation] Verify Netopeer operational data
59 ${resp} RequestsLibrary.GET On Session
61 ... url=${REST_TOPOLOGY_NETCONF}/${REST_NTPR_MOUNT}?content=nonconfig
62 ... expected_status=200
64 Should Contain ${resp.content} schema
65 Should Contain ${resp.content} statistics
66 Should Contain ${resp.content} datastores
71 ${resp} RequestsLibrary.GET On Session
73 ... url=${REST_TOPOLOGY_NETCONF}/node=netopeer?content=nonconfig
74 ... expected_status=200
76 Should Contain ${resp.content} "node-id":"netopeer"
77 Should Contain ${resp.content} "netconf-node-topology:connection-status":"connected"
78 Should Contain ${resp.content} "netconf-node-topology:available-capabilities"