X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=blobdiff_plain;f=RO-SDN-arista%2Fosm_rosdn_arista%2Fwimconn_arista.py;h=0b49cb03d7b8934e80b6f4da7ed3b8383fd68bbb;hp=76d14b4cefcf47a6125877bc02baee4d05f8d73a;hb=8e282cfed41bdee78e9f0152fbcc3c2b33bc7c65;hpb=96a262702650a52e8f3075ba4fb5d043d7f88147 diff --git a/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py b/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py index 76d14b4c..0b49cb03 100644 --- a/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py +++ b/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py @@ -561,6 +561,7 @@ class AristaSdnConnector(SdnConnectorBase): vlan_processed = False vlan_id = '' i = 0 + processed_connection_points = [] for cp in connection_points: i += 1 encap_info = cp.get(self.__ENCAPSULATION_INFO_PARAM) @@ -606,6 +607,12 @@ class AristaSdnConnector(SdnConnectorBase): if not interface: raise SdnConnectorError(message="Connection point switch port empty for switch_dpid {}".format(switch_id), http_code=406) + # remove those connections that are equal. This happens when several sriovs are located in the same + # compute node interface, that is, in the same switch and interface + switches = [x for x in switches if x not in processed_connection_points] + if not switches: + continue + processed_connection_points += switches for switch in switches: # it should be only one switch where the mac is attached if encap_type == 'dot1q':