public List<NextObjective> updateNext(NextObjective nextObjective) { switch (this.operator) { case Parallel: case Sequential: case Override: return updateNextComposition(nextObjective); case Application: if (nextObjective.appId().id() == this.applicationId) { return this.nextTable.updateNext(nextObjective); } else { return new ArrayList<>(); } default: return new ArrayList<>(); } }
/** * Removes all groups in multiple possible group-chains that represent the next * objective. * * @param nextObjective the next objective to remove * @param next the NextGroup that represents the existing group-chain for * this next objective */ protected void removeGroup(NextObjective nextObjective, NextGroup next) { List<Deque<GroupKey>> allgkeys = Ofdpa2Pipeline.appKryo.deserialize(next.data()); List<GroupKey> groupKeys = allgkeys.stream() .map(Deque::getFirst).collect(Collectors.toList()); pendingRemoveNextObjectives.put(nextObjective, groupKeys); allgkeys.forEach(groupChain -> groupChain.forEach(groupKey -> groupService.removeGroup(deviceId, groupKey, nextObjective.appId()))); flowObjectiveStore.removeNextGroup(nextObjective.id()); }
key, null, nextObjective.appId()); groupService.addGroup(groupDesc); break; case REMOVE: groupService.removeGroup(deviceId, key, nextObjective.appId()); break; case ADD_TO_EXISTING: groupService.addBucketsToGroup(deviceId, key, new GroupBuckets(Collections.singletonList(bucket)), key, nextObjective.appId()); break; case REMOVE_FROM_EXISTING: groupService.removeBucketsFromGroup(deviceId, key, new GroupBuckets(Collections.singletonList(bucket)), key, nextObjective.appId()); break; default:
l2floodgroupkey, l2floodgroupId, nextObj.appId()); log.debug("Trying L2-Flood: device:{} gid:{} gkey:{} nextid:{}", deviceId, Integer.toHexString(l2floodgroupId),
l3MulticastGroupKey, l3MulticastGroupId, nextObj.appId());
l3ecmpGroupKey, l3ecmpGroupId, nextObj.appId()); GroupChainElem l3ecmpGce = new GroupChainElem(l3ecmpGroupDesc, l3ecmpGroupBuckets.size(),
nextObj.appId(), false, nextObj.meta()); if (groupInfo == null) {
l3ecmpGroupKey, l3ecmpGroupId, nextObjective.appId()); GroupChainElem l3ecmpGce = new GroupChainElem(l3ecmpGroupDesc, 1, true);
nextObj.appId(), false, nextObj.meta()); if (nolabelGroupInfo == null) { nextObj.appId(), true, nextObj.meta()); if (onelabelGroupInfo == null) { l3vpngroupkey, l3vpngroupId, nextObj.appId()); GroupChainElem l3vpnGce = new GroupChainElem(l3vpnGroupDesc, 1, false); updatePendingGroups(onelabelGroupInfo.nextGroupDesc.appCookie(), l3vpnGce);
groupService.removeBucketsFromGroup(deviceId, modGroupKey, removeBuckets, modGroupKey, nextObjective.appId());
l2InterfaceGroupKey, l2InterfaceGroupId, nextObj.appId()); log.debug("Trying L2-Interface: device:{} gid:{} gkey:{} nextid:{}", deviceId, Integer.toHexString(l2InterfaceGroupId),
key, nextObjective.appId()); groupService.addGroup(groupDescription); pendingGroups.put(key, nextObjective);