diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-12-01 05:49:27 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-12-01 05:49:27 -0800 |
commit | e63291850fd0795c5700e25e67e5dee89ba54c5f (patch) | |
tree | 9707289536ad95bb739c9856761ad43275e07d8c /framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java | |
parent | 671823e12bc13be9a8b87a5d7de33da1bb7a44e8 (diff) |
onos commit hash c2999f30c69e50df905a9d175ef80b3f23a98514
Change-Id: I2bb8562c4942b6d6a6d60b663db2e17540477b81
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java')
-rw-r--r-- | framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java index 84fe5168..f6bf649c 100644 --- a/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java +++ b/framework/src/onos/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java @@ -424,17 +424,22 @@ public class SegmentRoutingManager implements SegmentRoutingService { /** * Returns the next objective ID for the given NeighborSet. - * If the nextObjectiveID does not exist, a new one is created and returned. + * If the nextObjective does not exist, a new one is created and + * it's id is returned. + * TODO move the side-effect creation of a Next Objective into a new method * * @param deviceId Device ID * @param ns NegighborSet - * @return next objective ID + * @param meta metadata passed into the creation of a Next Objective + * @return next objective ID or -1 if an error was encountered during the + * creation of the nextObjective */ - public int getNextObjectiveId(DeviceId deviceId, NeighborSet ns) { + public int getNextObjectiveId(DeviceId deviceId, NeighborSet ns, + TrafficSelector meta) { if (groupHandlerMap.get(deviceId) != null) { log.trace("getNextObjectiveId query in device {}", deviceId); return groupHandlerMap - .get(deviceId).getNextObjectiveId(ns); + .get(deviceId).getNextObjectiveId(ns, meta); } else { log.warn("getNextObjectiveId query in device {} not found", deviceId); return -1; @@ -586,7 +591,8 @@ public class SegmentRoutingManager implements SegmentRoutingService { DefaultGroupHandler groupHandler = groupHandlerMap.get(link.src() .deviceId()); if (groupHandler != null) { - groupHandler.linkUp(link); + groupHandler.linkUp(link, mastershipService.isLocalMaster( + link.src().deviceId())); } else { Device device = deviceService.getDevice(link.src().deviceId()); if (device != null) { @@ -596,7 +602,7 @@ public class SegmentRoutingManager implements SegmentRoutingService { processDeviceAdded(device); groupHandler = groupHandlerMap.get(link.src() .deviceId()); - groupHandler.linkUp(link); + groupHandler.linkUp(link, mastershipService.isLocalMaster(device.id())); } } |