From: Luis Gomez Date: Wed, 12 Nov 2014 01:06:44 +0000 (-0800) Subject: Fix Netconf test to work with latest changes on Netconf connector X-Git-Tag: release/helium-sr1.1~14^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=9a9ab5034f3058cf89d6593b4848d512ef489869;p=integration%2Ftest.git Fix Netconf test to work with latest changes on Netconf connector Change-Id: I7c5b783e1529c0591cc38137b3e7f26ec75285bb Signed-off-by: Luis Gomez --- diff --git a/test/csit/suites/karaf-compatible/110__NETCONF/010__netconf_inventory.txt b/test/csit/suites/karaf-compatible/110__NETCONF/010__netconf_inventory.txt index fd168243d0..dd6b5237a7 100644 --- a/test/csit/suites/karaf-compatible/110__NETCONF/010__netconf_inventory.txt +++ b/test/csit/suites/karaf-compatible/110__NETCONF/010__netconf_inventory.txt @@ -11,9 +11,9 @@ Variables ../../../variables/Variables.py *** 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 *** @@ -21,27 +21,25 @@ Add NetConf device [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 @@ -54,10 +52,11 @@ Verify Device 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" diff --git a/test/csit/variables/xmls/netconf.xml b/test/csit/variables/xmls/netconf.xml index 437486aefc..fe21ad1903 100644 --- a/test/csit/variables/xmls/netconf.xml +++ b/test/csit/variables/xmls/netconf.xml @@ -1,4 +1,4 @@ - + prefix:sal-netconf-connector netopeer
127.0.0.1