Skip edge port disabling logic when the setup has only a pair of leaves
The mechanism was originally introduced to signal dual-homed hosts to send traffic via another leaf when a leaf doesn't have any uplink
by disable edge ports.
This logic is no longer applicable in a setup with only a pair of leaves.
Change-Id: I0c00e866422c7104c76388f5a913eb35acc026ba
diff --git a/impl/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java b/impl/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java
index 0f9efce..7980d25 100644
--- a/impl/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java
+++ b/impl/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java
@@ -426,6 +426,14 @@
}
@Override
+ public List<DeviceId> getInfraDeviceIds() {
+ return deviceConfigMap.values().stream()
+ .filter(deviceInfo -> !deviceInfo.isEdge)
+ .map(deviceInfo -> deviceInfo.deviceId)
+ .collect(Collectors.toList());
+ }
+
+ @Override
public List<Integer> getAllDeviceSegmentIds() {
return allSegmentIds;
}