X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Ftopology.py;h=e05f4ef7322aa66699e48c8cde77968c48310627;hb=7829fea4a2c8936513fa95215b7d84997f814a69;hp=7dec51619c4d91606e886c3fa438d6cac8a55382;hpb=2da2aa12260143bc513b4dff5e2b2ef6755172ab;p=csit.git diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 7dec51619c..e05f4ef732 100644 --- a/resources/libraries/python/topology.py +++ b/resources/libraries/python/topology.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -174,7 +174,8 @@ class Topology: port_types = ( u"subinterface", u"vlan_subif", u"memif", u"tap", u"vhost", u"loopback", u"gre_tunnel", u"vxlan_tunnel", u"eth_bond", - u"eth_avf", u"eth_rdma" + u"eth_avf", u"eth_rdma", u"geneve_tunnel", u"eth_af_xdp", + u"gtpu_tunnel" ) for node_data in nodes.values(): @@ -879,8 +880,6 @@ class Topology: :rtype: list """ - logger.trace(f"node1: {str(node1)}") - logger.trace(f"node2: {str(node2)}") node1_links = self._get_node_active_link_names( node1, filter_list=filter_list_node1 ) @@ -894,7 +893,10 @@ class Topology: elif node2_links is None: logger.error(u"Unable to find active links for node2") else: - connecting_links = list(set(node1_links).intersection(node2_links)) + # Not using set operations, as we need deterministic order. + connecting_links = [ + link for link in node1_links if link in node2_links + ] return connecting_links @@ -1138,4 +1140,5 @@ class Topology: """ for node in nodes.values(): if u"sockets" in list(node.keys()): + # Containers are disconnected and destroyed already. node.pop(u"sockets")