nextObjective = builder.add(); break; case "REMOVE":
private List<Objective> createBroadcastObjective(ForwardingInstructions instructions, Set<TrafficTreatment> treatmentsWithDifferentPort, LinkCollectionIntent intent) { List<Objective> objectives = Lists.newArrayList(); ForwardingObjective forwardingObjective; NextObjective nextObjective; Integer nextId = flowObjectiveService.allocateNextId(); forwardingObjective = buildForwardingObjective(instructions.selector(), nextId, intent.priority()); DefaultNextObjective.Builder nxBuilder = DefaultNextObjective.builder(); nxBuilder.withId(nextId) .withMeta(instructions.selector()) .withType(NextObjective.Type.BROADCAST) .fromApp(appId) .withPriority(intent.priority()) .makePermanent(); treatmentsWithDifferentPort.forEach(nxBuilder::addTreatment); nextObjective = nxBuilder.add(); objectives.add(forwardingObjective); objectives.add(nextObjective); return objectives; }
private List<Objective> createSimpleNextObjective(ForwardingInstructions instructions, LinkCollectionIntent intent) { List<Objective> objectives = Lists.newArrayList(); ForwardingObjective forwardingObjective; NextObjective nextObjective; Integer nextId = flowObjectiveService.allocateNextId(); forwardingObjective = buildForwardingObjective(instructions.selector(), nextId, intent.priority()); DefaultNextObjective.Builder nxBuilder = DefaultNextObjective.builder(); nextObjective = nxBuilder.withId(nextId) .withMeta(instructions.selector()) .addTreatment(instructions.treatment()) .withType(NextObjective.Type.SIMPLE) .fromApp(appId) .makePermanent() .withPriority(intent.priority()) .add(); objectives.add(forwardingObjective); objectives.add(nextObjective); return objectives; }
.withType(NextObjective.Type.SIMPLE) .fromApp(appId) .makePermanent().add(); objectives.add(nextObjective); devices.add(ingress.deviceId());