/** * Creates a simple L2 Interface Group. * * @param nextObj the next Objective */ private void createL2InterfaceGroup(NextObjective nextObj) { VlanId assignedVlan = Ofdpa2Pipeline.readVlanFromSelector(nextObj.meta()); if (assignedVlan == null) { log.warn("VLAN ID required by simple next obj is missing. Abort."); Ofdpa2Pipeline.fail(nextObj, ObjectiveError.BADPARAMS); return; } List<GroupInfo> groupInfos = prepareL2InterfaceGroup(nextObj, assignedVlan); // There is only one L2 interface group in this case GroupDescription l2InterfaceGroupDesc = groupInfos.get(0).innerMostGroupDesc; // Put all dependency information into allGroupKeys List<Deque<GroupKey>> allGroupKeys = Lists.newArrayList(); Deque<GroupKey> gkeyChain = new ArrayDeque<>(); gkeyChain.addFirst(l2InterfaceGroupDesc.appCookie()); allGroupKeys.add(gkeyChain); // Point the next objective to this group OfdpaNextGroup ofdpaGrp = new OfdpaNextGroup(allGroupKeys, nextObj); updatePendingNextObjective(l2InterfaceGroupDesc.appCookie(), ofdpaGrp); // Start installing the inner-most group groupService.addGroup(l2InterfaceGroupDesc); }
gce.groupDescription.appId()); } else { groupService.addGroup(gce.groupDescription);
groupService.addGroup(groupInfo.innerMostGroupDesc); });
groupService.addGroup(groupInfo.innerMostGroupDesc); });
null, nextObjective.appId()); groupService.addGroup(groupDesc); break; case REMOVE:
groupService.addGroup(groupInfo.innerMostGroupDesc);
Integer.toHexString(gi.innerMostGroupDesc.givenGroupId()), deviceId); updatePendingGroups(gi.nextGroupDesc.appCookie(), l3ecmpGce); groupService.addGroup(gi.innerMostGroupDesc);
L2ForwardServiceImpl.GROUP_ID, appid); groupService.addGroup(groupDescription);
/** * Creates a new failover group with the initial ports of the links * from the primary and backup path. * * @param links links from the primary path * @param backupLinks links from the backup path * @param intent intent from which this call originates */ private void createFailoverTreatmentGroup(List<Link> links, List<Link> backupLinks, PointToPointIntent intent) { List<GroupBucket> buckets = new ArrayList<>(); TrafficTreatment.Builder tBuilderIn = DefaultTrafficTreatment.builder(); ConnectPoint src = links.get(0).src(); tBuilderIn.setOutput(src.port()); TrafficTreatment.Builder tBuilderIn2 = DefaultTrafficTreatment.builder(); ConnectPoint src2 = backupLinks.get(0).src(); tBuilderIn2.setOutput(src2.port()); buckets.add(DefaultGroupBucket.createFailoverGroupBucket(tBuilderIn.build(), src.port(), null)); buckets.add(DefaultGroupBucket.createFailoverGroupBucket(tBuilderIn2.build(), src2.port(), null)); GroupBuckets groupBuckets = new GroupBuckets(buckets); GroupDescription groupDesc = new DefaultGroupDescription(src.deviceId(), Group.Type.FAILOVER, groupBuckets, makeGroupKey(intent.id()), null, intent.appId()); log.trace("adding failover group {}", groupDesc); groupService.addGroup(groupDesc); }
Integer.toHexString(gi.innerMostGroupDesc.givenGroupId()), deviceId); updatePendingGroups(gi.nextGroupDesc.appCookie(), l3ecmpGce); groupService.addGroup(gi.innerMostGroupDesc);
groupService.addGroup(groupDescription); pendingGroups.put(key, nextObjective);