*** Variables ***
${FILE} ${CURDIR}/../../../variables/xmls/netconf.xml
-${REST_CONT_CONF} /restconf/config/opendaylight-inventory:nodes
+${REST_CONT_CONF} /restconf/config/opendaylight-inventory:nodes
${REST_CONT_OPER} /restconf/operational/opendaylight-inventory:nodes
-${REST_NTPR_CONF} node/controller-config/yang-ext:mount/config:modules/config:module/netopeer
+${REST_NTPR_CONF} node/controller-config/yang-ext:mount/config:modules
${REST_NTPR_MOUNT} node/netopeer/yang-ext:mount/
*** Test Cases ***
[Documentation] Add NetConf device using REST
[Tags] netconf
${XML1} Get File ${FILE}
- ${XML2} Replace String 127.0.0.1 ${MININET} ${XML1}
- ${body} Replace String mininet ${MININET_USER} ${XML2}
+ ${XML2} Replace String ${XML1} 127.0.0.1 ${MININET}
+ ${body} Replace String ${XML2} mininet ${MININET_USER}
Log ${body}
- ${resp} Putxml session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body}
+ ${resp} Post session ${REST_CONT_CONF}/${REST_NTPR_CONF} data=${body}
Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.status_code} 204
Get Controller Inventory
[Documentation] Get Controller operational inventory
[Tags] netconf
- ${resp} Get session ${REST_CONT_OPER}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} "id":"netopeer"
- Should Contain ${resp.content} "netconf-node-inventory:connected":true
- Should Contain ${resp.content} "netconf-node-inventory:initial-capability"
+ Wait Until Keyword Succeeds 10s 2s Get Inventory
Pull External Device configuration
[Documentation] Pull Netopeer configuration
[Tags] netconf
- Wait Until Keyword Succeeds 10s 2s Pull Config
+ ${resp} Get session ${REST_CONT_CONF}/${REST_NTPR_MOUNT}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Contain ${resp.content} {}
Verify Device Operational data
[Documentation] Verify Netopeer operational data
Should Contain ${resp.content} datastores
*** Keywords ***
-Pull Config
- ${resp} Get session ${REST_CONT_CONF}/${REST_NTPR_MOUNT}
+Get Inventory
+ ${resp} Get session ${REST_CONT_OPER}
Log ${resp.content}
Should Be Equal As Strings ${resp.status_code} 200
- Should Contain ${resp.content} {}
-
+ Should Contain ${resp.content} "id":"netopeer"
+ Should Contain ${resp.content} "netconf-node-inventory:connected":true
+ Should Contain ${resp.content} "netconf-node-inventory:initial-capability"