Migrate netconf suites restconf calls to rfc8040
[integration/test.git] / csit / suites / netconf / ready / netconfready.robot
index efbe5161806043db7ce52b2528adfb31aab39406..266e52ab8d6bd0b98e58fee52d19ed1956a674e0 100644 (file)
@@ -73,11 +73,12 @@ ${USE_NETCONF_CONNECTOR}    False
 ${DEBUG_LOGGING_FOR_EVERYTHING}    False
 ${NETCONFREADY_WAIT_MDSAL}    60s
 ${DEVICE_NAME}    test-device
-${DEVICE_PORT}    1830
+${DEVICE_PORT}    2830
 ${NETCONF_FOLDER}    ${CURDIR}/../../../variables/netconf/device
 
 *** Test Cases ***
 Check_Whether_Netconf_Topology_Is_Ready
+    [Tags]    ODLMICRO_IGN
     [Documentation]    Checks netconf readiness.
     BuiltIn.Pass_Execution_If    ${USE_NETCONF_CONNECTOR}==${True}    Netconf connector is used. Next testcases do their job in this case.
     BuiltIn.Wait_Until_Keyword_Succeeds    10x    1s    Check_Netconf_Topology_Ready
@@ -122,6 +123,7 @@ Check_Whether_Netconf_Can_Pretty_Print
     Check_Netconf_Up_And_Running    ?prettyPrint=true
 
 Wait_For_MDSAL
+    [Tags]    ODLMICRO_IGN
     [Documentation]    Wait for the MDSAL feature to become online
     ${status}    ${message}=    BuiltIn.Run_Keyword_And_Ignore_Error    KarafKeywords.Verify_Feature_Is_Installed    odl-netconf-mdsal
     BuiltIn.Run_Keyword_If    '${status}' == 'FAIL'    BuiltIn.Pass_Execution    The 'odl-netconf-mdsal' feature is not installed so no need to wait for it.
@@ -149,14 +151,15 @@ Teardown_Everything
 
 Set_Netconf_Connector
     [Documentation]    Sets netconf connector verify url according to the ${ODL_STREAM} and ${USE_NETCONF_CONNECTOR} combination
-    ${streamconnector}=    CompareStream.Set_Variable_If_At_Most_Boron    /node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/controller-config    /node/controller-config/yang-ext:mount/config:modules/module/sal-restconf-service:json-restconf-service-impl/json-restconf-service-impl
+    ${streamconnector}=    Set Variable    /node/controller-config/yang-ext:mount/config:modules/module/sal-restconf-service:json-restconf-service-impl/json-restconf-service-impl
     ${connector}=    BuiltIn.Set_Variable_If    ${USE_NETCONF_CONNECTOR}    ${streamconnector}    ${EMPTY}
     BuiltIn.Return_From_Keyword    ${connector}
 
 Check_Netconf_Topology_Ready
     [Documentation]    Verifies the netconf readiness for every odl node.
-    : FOR    ${idx}    IN    @{ClusterManagement__member_index_list}
-    \    Verify_Netconf_Topology_Ready_For_Node    ${idx}
+    FOR    ${idx}    IN    @{ClusterManagement__member_index_list}
+        Verify_Netconf_Topology_Ready_For_Node    ${idx}
+    END
 
 Verify_Netconf_Topology_Ready_For_Node
     [Arguments]    ${node_index}
@@ -164,12 +167,13 @@ Verify_Netconf_Topology_Ready_For_Node
     ...    and performing GET operation got from the device's mount point.
     ${session} =    ClusterManagement.Resolve_Http_Session_For_Member    member_index=${node_index}
     Configure_Netconf_Device    ${DEVICE_NAME}    ${session}    ${ODL_SYSTEM_${node_index}_IP}
-    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}    MODULE_TYPE=sal-restconf-service:json-restconf-service-impl    MODULE_NAME=json-restconf-service-impl
+    &{mapping}    BuiltIn.Create_Dictionary    DEVICE_NAME=${DEVICE_NAME}
     Wait_Netconf_Device_Mounted    ${DEVICE_NAME}    ${session}    ${mapping}
-    : FOR    ${idx}    IN    @{ClusterManagement__member_index_list}
-    \    ${mod_session}=    ClusterManagement.Resolve_Http_Session_For_Member    member_index=${idx}
-    \    BuiltIn.Wait_Until_Keyword_Succeeds    5x    3s    TemplatedRequests.Get_As_Xml_Templated    ${NETCONF_FOLDER}${/}module    mapping=${mapping}
-    \    ...    session=${mod_session}
+    FOR    ${idx}    IN    @{ClusterManagement__member_index_list}
+        ${mod_session}=    ClusterManagement.Resolve_Http_Session_For_Member    member_index=${idx}
+        BuiltIn.Wait_Until_Keyword_Succeeds    5x    3s    TemplatedRequests.Get_As_Xml_Templated    ${NETCONF_FOLDER}${/}netconf-state    mapping=${mapping}
+        ...    session=${mod_session}
+    END
     [Teardown]    Remove_Netconf_Device    ${DEVICE_NAME}    ${session}
 
 Configure_Netconf_Device
@@ -191,7 +195,7 @@ Wait_Netconf_Device_Mounted
 Check_Netconf_Up_And_Running
     [Arguments]    ${pretty_print}=${EMPTY}
     [Documentation]    Make a request to netconf connector's list of mounted devices and check that the request was successful.
-    ${response}=    RequestsLibrary.Get_Request    ses    restconf/config/network-topology:network-topology/topology/topology-netconf${netconf_connector}${pretty_print}
+    ${response}=    RequestsLibrary.Get_Request    ses    rests/data/network-topology:network-topology/topology\=topology-netconf${netconf_connector}${pretty_print}
     BuiltIn.Log    ${response.text}
     ${status}=    BuiltIn.Run_Keyword_And_Return_Status    BuiltIn.Should_Contain    ${response.text}    data model content does not exist
     BuiltIn.Run_Keyword_If    ${status}    BuiltIn.Set_Suite_Variable    ${netconf_not_ready_cause}    5832