@Override public void run() { Set<GroupKey> keys = pendingGroups.keySet().stream() .filter(key -> groupService.getGroup(deviceId, key) != null) .collect(Collectors.toSet()); Set<GroupKey> otherkeys = pendingAddNextObjectives.asMap().keySet().stream() .filter(otherkey -> groupService.getGroup(deviceId, otherkey) != null) .collect(Collectors.toSet()); keys.addAll(otherkeys); keys.stream().forEach(key -> processPendingAddGroupsOrNextObjs(key, false)); } }
@Override public void run() { Set<GroupKey> keys = pendingGroups.asMap().keySet().stream() .filter(key -> groupService.getGroup(deviceId, key) != null) .collect(Collectors.toSet()); keys.stream().forEach(key -> { NextObjective obj = pendingGroups.getIfPresent(key); if (obj == null) { return; } pass(obj); pendingGroups.invalidate(key); log.info("Heard back from group service for group {}. " + "Applying pending forwarding objectives", obj.id()); flowObjectiveStore.putNextGroup(obj.id(), new CentecV350Group(key)); }); } }
@Override public void run() { Set<GroupKey> keys = pendingGroups .asMap() .keySet() .stream() .filter(key -> groupService.getGroup(deviceId, key) != null) .collect(Collectors.toSet()); keys.stream() .forEach(key -> { NextObjective obj = pendingGroups .getIfPresent(key); if (obj == null) { return; } log.debug("Group verified: dev:{} gid:{} <<->> nextId:{}", deviceId, groupService.getGroup(deviceId, key).id(), obj.id()); pass(obj); pendingGroups.invalidate(key); flowObjectiveStore.putNextGroup( obj.id(), new SpringOpenGroup(key, null)); }); } }
StringBuffer gchain = new StringBuffer(); for (GroupKey gk : gkd) { Group g = groupService.getGroup(deviceId, gk); if (g == null) { gchain.append(" NoGrp").append(" -->");
(added) ? "ADDED" : "processed", key, deviceId, nextGrp.nextObjective().id(), Integer.toHexString(groupService.getGroup(deviceId, key) .givenGroupId())); Ofdpa2Pipeline.pass(nextGrp.nextObjective());
Group group = groupService.getGroup(pointIntent.filteredIngressPoint().connectPoint().deviceId(), makeGroupKey(pointIntent.id())); if (group != null) {
private void addBucketToGroup(NextObjective nextObjective) { log.debug("addBucketToGroup in {}: for next objective id {}", deviceId, nextObjective.id()); Collection<TrafficTreatment> treatments = nextObjective.next(); TrafficTreatment treatment = treatments.iterator().next(); final GroupKey key = new DefaultGroupKey( appKryo.serialize(nextObjective .id())); Group group = groupService.getGroup(deviceId, key); if (group == null) { log.warn("Group is not found in {} for {}", deviceId, key); return; } GroupBucket bucket; if (group.type() == GroupDescription.Type.INDIRECT) { bucket = DefaultGroupBucket.createIndirectGroupBucket(treatment); } else if (group.type() == GroupDescription.Type.SELECT) { bucket = DefaultGroupBucket.createSelectGroupBucket(treatment); } else if (group.type() == GroupDescription.Type.ALL) { bucket = DefaultGroupBucket.createAllGroupBucket(treatment); } else { log.warn("Unsupported Group type {}", group.type()); return; } GroupBuckets bucketsToAdd = new GroupBuckets(Collections.singletonList(bucket)); log.debug("Adding buckets to group id {} of next objective id {} in device {}", group.id(), nextObjective.id(), deviceId); groupService.addBucketsToGroup(deviceId, key, bucketsToAdd, key, appId); }
appKryo.serialize(nextObjective .id())); Group group = groupService.getGroup(deviceId, key); if (group == null) { log.warn("Group is not found in {} for {}", deviceId, key);
/** * Gets primary port number through failover group associated * with this intent. */ private PortNumber getPrimaryPort(PointToPointIntent intent) { Group group = groupService.getGroup(intent.filteredIngressPoint().connectPoint().deviceId(), makeGroupKey(intent.id())); PortNumber primaryPort = null; if (group != null) { List<GroupBucket> buckets = group.buckets().buckets(); Iterator<GroupBucket> iterator = buckets.iterator(); while (primaryPort == null && iterator.hasNext()) { GroupBucket bucket = iterator.next(); Instruction individualInstruction = bucket.treatment().allInstructions().get(0); if (individualInstruction instanceof Instructions.OutputInstruction) { Instructions.OutputInstruction outInstruction = (Instructions.OutputInstruction) individualInstruction; PortNumber tempPortNum = outInstruction.port(); Port port = deviceService.getPort(intent.filteredIngressPoint().connectPoint().deviceId(), tempPortNum); if (port != null && port.isEnabled()) { primaryPort = tempPortNum; } } } } return primaryPort; }
List<Deque<GroupKey>> gkeys = appKryo.deserialize(next.data()); Group group = groupService.getGroup(deviceId, gkeys.get(0).peekFirst()); if (group == null) { log.warn("Group with key:{} for next-id:{} not found in dev:{}",
List<Deque<GroupKey>> gkeys = appKryo.deserialize(next.data()); Group group = groupService.getGroup(deviceId, gkeys.get(0).peekFirst()); if (group == null) { log.warn("Group with key:{} for next-id:{} not found in dev:{}",
if (groupService.getGroup(ingressPoint.deviceId(), makeGroupKey(intent.id())) == null) {
List<Deque<GroupKey>> gkeys = appKryo.deserialize(next.data()); Group group = groupService.getGroup(deviceId, gkeys.get(0).peekFirst()); if (group == null) { log.warn("Group with key:{} for next-id:{} not found in dev:{}",
List<Deque<GroupKey>> gkeys = appKryo.deserialize(next.data()); Group group = groupService.getGroup(deviceId, gkeys.get(0).peekFirst()); if (group != null) { treatmentBuilder.deferred().group(group.id());
List<Deque<GroupKey>> gkeys = appKryo.deserialize(next.data()); Group group = groupService.getGroup(deviceId, gkeys.get(0).peekFirst()); if (group != null) { treatmentBuilder.deferred().group(group.id());
Group group = groupService.getGroup(deviceId, key); if (group == null) { log.warn("The group left!");
Group group = groupService.getGroup(deviceId, key); TrafficTreatment treatment = buildTreatment(Instructions.createGroup(group.id()));
NextGroup next = flowObjectiveStore.getNextGroup(fwd.nextId()); GroupKey key = appKryo.deserialize(next.data()); Group group = groupService.getGroup(deviceId, key); if (group == null) { log.warn("The group left!");
Group group = groupService.getGroup(deviceId, key); if (group == null) { log.warn("The group left!");