Replace entity-owners API call
[integration/test.git] / csit / libraries / ClusterManagement.robot
index 7a9d2a82a0985acdc502dd78cf49397f8a6114e3..c58fb4c80c08522b35aedf6f22d555cc4a0e7fc5 100644 (file)
@@ -41,7 +41,6 @@ Resource          ${CURDIR}/Utils.robot    # for Run_Command_On_Controller
 Resource          ../variables/Variables.robot
 
 *** Variables ***
-${ENTITY_OWNER_URI}    restconf/operational/entity-owners:entity-owners
 ${RESTCONF_URI}    rests
 ${GC_LOG_PATH}    ${KARAF_HOME}/data/log
 ${JAVA_HOME}      ${EMPTY}    # releng/builder scripts should provide correct value
@@ -234,7 +233,7 @@ Get_Owner_And_Candidates_For_Device_Rpc
     ${ip} =    Resolve_IP_Address_For_Member    member_index=${index}
     ${entity_type} =    BuiltIn.Set_Variable_If    '${device_type}' == 'netconf'    netconf-node/${device_name}    ${device_type}
     ${url} =    BuiltIn.Catenate    SEPARATOR=    http://    ${ip}    :8181/    ${RESTCONF_URI}
-    ${entity_result} =    ClusterEntities.get entity    ${url}    ${entity_type}    ${device_name}
+    ${entity_result} =    ClusterEntities.Get_Entity    ${url}    ${entity_type}    ${device_name}
     ${entity_candidates} =    Collections.Get_From_Dictionary    ${entity_result}    candidates
     ${entity_owner} =    Collections.Get_From_Dictionary    ${entity_result}    owner
     BuiltIn.Should_Not_Be_Empty    ${entity_owner}    No owner found for ${device_name}
@@ -675,6 +674,15 @@ Put_As_Json_And_Check_Member_List_Or_All
     Wait Until Keyword Succeeds    5s    1s    Check_Json_Member_List_Or_All    uri=${uri}    expected_data=${data}    member_index_list=${member_index_list}
     [Return]    ${response_text}
 
+Put_As_Json_And_Check_Member_List_Or_All_RFC8040
+    # FIXME: merge this keyword with Bierman02 version above when OVSDB test is migrated to RFC8040
+    [Arguments]    ${uri}    ${data}    ${member_index}    ${member_index_list}=${EMPTY}
+    [Documentation]    Send a PUT with the supplied uri ${uri} and body ${data} to member ${member_index}.
+    ...    Then check data is replicated in all or some members defined in ${member_index_list}.
+    ${response_text} =    Put_As_Json_To_Member    uri=${uri}    data=${data}    member_index=${member_index}
+    Wait Until Keyword Succeeds    5s    1s    Check_Json_Member_List_Or_All    uri=${uri}?content=config    expected_data=${data}    member_index_list=${member_index_list}
+    [Return]    ${response_text}
+
 Put_As_Json_To_Member
     [Arguments]    ${uri}    ${data}    ${member_index}
     [Documentation]    Send a PUT with the supplied uri and data to member ${member_index}.