From 87f1ffde4f7b3c6081c3985015874113eb8a2340 Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Tue, 13 Nov 2018 15:47:42 -0800 Subject: [PATCH] Fix cluster suites after latest updates - For OFP inventory returns empty when no switch is connected. - For Netconf there is a change in the singleton entity ID. Change-Id: I57780e099f1c59b23d89007c47f5855f1a45ff18 Signed-off-by: Luis Gomez --- csit/libraries/ClusterManagement.robot | 10 ++++++---- csit/libraries/ClusterOpenFlow.robot | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/csit/libraries/ClusterManagement.robot b/csit/libraries/ClusterManagement.robot index 6b4478f4cc..4b61a87055 100644 --- a/csit/libraries/ClusterManagement.robot +++ b/csit/libraries/ClusterManagement.robot @@ -50,8 +50,10 @@ ${JOLOKIA_READ_URI} jolokia/read/org.opendaylight.controller # Bug 9044 workaround: delete etc/host.key before restart. @{ODL_DEFAULT_DATA_PATHS} tmp/ data/ cache/ snapshots/ journal/ etc/opendaylight/current/ etc/host.key ${RESTCONF_MODULES_DIR} ${CURDIR}/../variables/restconf/modules -${SINGLETON_NETCONF_DEVICE_ID_PREFIX} /odl-general-entity:entity[odl-general-entity:name='KeyedInstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node, path=[org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology[key=TopologyKey [_topologyId=Uri [_value=topology-netconf]]], org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node[key=NodeKey [_nodeId=Uri [_value= -${SINGLETON_NETCONF_DEVICE_ID_SUFFIX} ]]]]}'] +${SINGLETON_NETCONF_DEVICE_ID_PREFIX_OLD} /odl-general-entity:entity[odl-general-entity:name='KeyedInstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node, path=[org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology[key=TopologyKey [_topologyId=Uri [_value=topology-netconf]]], org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node[key=NodeKey [_nodeId=Uri [_value= +${SINGLETON_NETCONF_DEVICE_ID_SUFFIX_OLD} ]]]]}'] +${SINGLETON_NETCONF_DEVICE_ID_PREFIX} /odl-general-entity:entity[odl-general-entity:name='KeyedInstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node, path=[org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology[key=TopologyKey{_topologyId=Uri{_value=topology-netconf}}], org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node[key=NodeKey{_nodeId=Uri{_value= +${SINGLETON_NETCONF_DEVICE_ID_SUFFIX} }}]]}'] ${SINGLETON_BGPCEP_DEVICE_ID_PREFIX} /odl-general-entity:entity[odl-general-entity:name=' ${SINGLETON_BGPCEP_DEVICE_ID_SUFFIX} -service-group'] ${SINGLETON_SXP_DEVICE_ID_PREFIX} /odl-general-entity:entity[odl-general-entity:name=' @@ -257,11 +259,11 @@ Get_Owner_And_Candidates_For_Device_Singleton_Netconf ... Parsing method is set as netconf (using netconf device id prefix and suffix) # Get election entity type results ${type} = BuiltIn.Set_Variable ${SINGLETON_ELECTION_ENTITY_TYPE} - ${id} = BuiltIn.Set_Variable ${SINGLETON_NETCONF_DEVICE_ID_PREFIX}${device_name}${SINGLETON_NETCONF_DEVICE_ID_SUFFIX} + ${id} = CompareStream.Set_Variable_If_At_Least_Fluorine ${SINGLETON_NETCONF_DEVICE_ID_PREFIX}${device_name}${SINGLETON_NETCONF_DEVICE_ID_SUFFIX} ${SINGLETON_NETCONF_DEVICE_ID_PREFIX_OLD}${device_name}${SINGLETON_NETCONF_DEVICE_ID_SUFFIX_OLD} ${owner_1} ${candidate_list_1} = Get_Owner_And_Candidates_For_Type_And_Id ${type} ${id} ${member_index} http_timeout=${http_timeout} # Get change ownership entity type results ${type} = BuiltIn.Set_Variable ${SINGLETON_CHANGE_OWNERSHIP_ENTITY_TYPE} - ${id} = BuiltIn.Set_Variable ${SINGLETON_NETCONF_DEVICE_ID_PREFIX}${device_name}${SINGLETON_NETCONF_DEVICE_ID_SUFFIX} + ${id} = CompareStream.Set_Variable_If_At_Least_Fluorine ${SINGLETON_NETCONF_DEVICE_ID_PREFIX}${device_name}${SINGLETON_NETCONF_DEVICE_ID_SUFFIX} ${SINGLETON_NETCONF_DEVICE_ID_PREFIX_OLD}${device_name}${SINGLETON_NETCONF_DEVICE_ID_SUFFIX_OLD} ${owner_2} ${candidate_list_2} = Get_Owner_And_Candidates_For_Type_And_Id ${type} ${id} ${member_index} http_timeout=${http_timeout} # Owners must be same, if not, there is still some election or change ownership in progress BuiltIn.Should_Be_Equal_As_Integers ${owner_1} ${owner_2} Owners for device ${device_name} are not same diff --git a/csit/libraries/ClusterOpenFlow.robot b/csit/libraries/ClusterOpenFlow.robot index 1a803be065..ae539deb6d 100644 --- a/csit/libraries/ClusterOpenFlow.robot +++ b/csit/libraries/ClusterOpenFlow.robot @@ -61,7 +61,9 @@ Check No OpenFlow Network Operational Information [Arguments] ${controller_index_list}=${EMPTY} [Documentation] Check device is not in operational inventory or topology in all cluster instances in ${controller_index_list}. ${dictionary} Create Dictionary openflow=0 - Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${OPERATIONAL_NODES_API} dictionary=${dictionary} member_index_list=${controller_index_list} + CompareStream.Run_Keyword_If_At_Least_Neon Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_No_Content_Member_List_Or_All uri=${OPERATIONAL_NODES_API} member_index_list=${controller_index_list} + CompareStream.Run_Keyword_If_At_Most_Fluorine Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${OPERATIONAL_NODES_API} dictionary=${dictionary} + ... member_index_list=${controller_index_list} ${dictionary} Create Dictionary openflow=0 Wait Until Keyword Succeeds 5s 1s ClusterManagement.Check_Item_Occurrence_Member_List_Or_All uri=${OPERATIONAL_TOPO_API} dictionary=${dictionary} member_index_list=${controller_index_list} -- 2.36.6