2 Documentation Test suite for NETCONF
3 Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
4 Suite Teardown Delete All Sessions
6 Library OperatingSystem
8 Library ../../../libraries/RequestsLibrary.py
9 Library ../../../libraries/Common.py
10 Variables ../../../variables/Variables.py
13 ${FILE} ${CURDIR}/../../../variables/xmls/netconf.xml
14 ${REST_CONT_CONF} /restconf/config/opendaylight-inventory:nodes
15 ${REST_CONT_OPER} /restconf/operational/opendaylight-inventory:nodes
16 ${REST_NTPR_CONF} node/controller-config/yang-ext:mount/config:modules/config:module/netopeer
17 ${REST_NTPR_MOUNT} node/netopeer/yang-ext:mount/
21 [Documentation] Add NetConf device using REST
23 ${XML1} Get File ${FILE}
24 ${XML2} Replace String 127.0.0.1 ${MININET} ${XML1}
25 ${body} Replace String mininet ${MININET_USER} ${XML2}
27 ${resp} Putxml session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body}
29 Should Be Equal As Strings ${resp.status_code} 200
31 Get Controller Inventory
32 [Documentation] Get Controller operational inventory
34 ${resp} Get session ${REST_CONT_OPER}
36 Should Be Equal As Strings ${resp.status_code} 200
37 Should Contain ${resp.content} "id":"netopeer"
38 Should Contain ${resp.content} "netconf-node-inventory:connected":true
39 Should Contain ${resp.content} "netconf-node-inventory:initial-capability"
41 Pull External Device configuration
42 [Documentation] Pull Netopeer configuration
44 Wait Until Keyword Succeeds 10s 2s Pull Config
46 Verify Device Operational data
47 [Documentation] Verify Netopeer operational data
49 ${resp} Get session ${REST_CONT_OPER}/${REST_NTPR_MOUNT}
51 Should Be Equal As Strings ${resp.status_code} 200
52 Should Contain ${resp.content} schema
53 Should Contain ${resp.content} statistics
54 Should Contain ${resp.content} datastores
58 ${resp} Get session ${REST_CONT_CONF}/${REST_NTPR_MOUNT}
60 Should Be Equal As Strings ${resp.status_code} 200
61 Should Contain ${resp.content} {}