FlowRule.Builder ruleBuilder = DefaultFlowRule.builder() .fromApp(fwd.appId()) .withPriority(fwd.priority()) .forDevice(deviceId) .withSelector(filteredSelector.build()) .withTreatment(tb.build()) .forTable(forTableId); ruleBuilder.makePermanent(); } else { ruleBuilder.makeTemporary(fwd.timeout()); flowRuleCollection.add(ruleBuilder.build()); if (defaultRule) { FlowRule.Builder rule = DefaultFlowRule.builder() .fromApp(fwd.appId()) .withPriority(fwd.priority()) .forDevice(deviceId) .withSelector(complementarySelector.build()) .withTreatment(tb.build()) .forTable(forTableId); if (fwd.permanent()) { rule.makePermanent(); } else { rule.makeTemporary(fwd.timeout()); flowRuleCollection.add(rule.build()); log.debug("Default rule 0.0.0.0/0 is being installed two rules");
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(HIGHEST_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(ACL_TABLE).build(); ops = install ? ops.add(rule) : ops.remove(rule);
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(HIGHEST_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(ACL_TABLE).build(); ops = install ? ops.add(rule) : ops.remove(rule);
FlowRule.Builder ruleBuilder = DefaultFlowRule.builder() .fromApp(fwd.appId()) .withPriority(fwd.priority()) .forDevice(deviceId) .withSelector(filteredSelector.build()) .withTreatment(tb.build()) .forTable(forTableId); ruleBuilder.makePermanent(); } else { ruleBuilder.makeTemporary(fwd.timeout()); flowRuleCollection.add(ruleBuilder.build()); if (defaultRule) { FlowRule.Builder rule = DefaultFlowRule.builder() .fromApp(fwd.appId()) .withPriority(fwd.priority()) .forDevice(deviceId) .withSelector(complementarySelector.build()) .withTreatment(tb.build()) .forTable(forTableId); if (fwd.permanent()) { rule.makePermanent(); } else { rule.makeTemporary(fwd.timeout()); flowRuleCollection.add(rule.build()); log.debug("Default rule 0.0.0.0/0 is being installed two rules");
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(FILTER_TABLE_TMAC_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(FILTER_TABLE).build(); ops = install ? ops.add(rule) : ops.remove(rule); rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(MAC_TABLE_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(MAC_TABLE).build(); ops = install ? ops.add(rule) : ops.remove(rule); } else if (c.type() == Criterion.Type.VLAN_VID) { .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(PORT_VLAN_TABLE_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(PORT_VLAN_TABLE).build(); ops = install ? ops.add(rule) : ops.remove(rule); } else if (c.type() == Criterion.Type.IPV4_DST) {
.fromApp(fwd.appId()).withPriority(fwd.priority()) .forDevice(deviceId).withSelector(filteredSelector) .withTreatment(treatment); ruleBuilder.makePermanent(); } else { ruleBuilder.makeTemporary(fwd.timeout()); ruleBuilder.forTable(forTableId); return Collections.singletonList(ruleBuilder.build());
.withSelector(sbuilder.build()) .withTreatment(treatment) .withPriority(randomPriority) .fromApp(appId) .makeTemporary(10) .build(); FlowRule removeRule = DefaultFlowRule.builder() .forDevice(d.id()) .withSelector(sbuilder.build()) .withTreatment(treatment) .withPriority(randomPriority) .fromApp(appId) .makeTemporary(10) .build();
TrafficTreatment tb = fwd.treatment(); FlowRule.Builder ruleBuilder = DefaultFlowRule.builder() .fromApp(fwd.appId()).withPriority(fwd.priority()) .forDevice(deviceId).withSelector(selector) .withTreatment(tb).makeTemporary(TIME_OUT); ruleBuilder.withPriority(fwd.priority()); if (fwd.permanent()) { ruleBuilder.makePermanent(); return reassemblyFlowRule(ruleBuilder, tb, transition, forTable); return Collections.singletonList(ruleBuilder.build());
flowRuleBuilder.fromApp(fwd.appId()) .withPriority(fwd.priority()) .forDevice(deviceId) .withSelector(filteredSelector) .withTreatment(filteredTreatment) .forTable(dstMacTableId); if (fwd.permanent()) { flowRuleBuilder.makePermanent(); } else { flowRuleBuilder.makeTemporary(fwd.timeout()); rules.add(flowRuleBuilder.build());
.fromApp(fwd.appId()).withPriority(fwd.priority()) .forDevice(deviceId).withSelector(filteredSelector) .withTreatment(treatment); ruleBuilder.makePermanent(); } else { ruleBuilder.makeTemporary(fwd.timeout()); ruleBuilder.forTable(forTableId); return Collections.singletonList(ruleBuilder.build());
.withSelector(selectorBuilder.build()) .withTreatment(treatmentBuilder.build()) .withPriority(intent.priority()) .fromApp(appId) .makePermanent() .build(); rules.add(rule); return rules; .withSelector(selectorBuilder.build()) .withTreatment(treatmentBuilder.build()) .withPriority(intent.priority()) .fromApp(appId) .makePermanent() .build(); selectorBuilder = DefaultTrafficSelector.builder(); .withSelector(selectorBuilder.build()) .withTreatment(treatmentLast.build()) .withPriority(intent.priority()) .fromApp(appId) .makePermanent() .build();
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(DEFAULT_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(VLAN_TABLE).build(); FlowRule preRule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(preSelector.build()) .withTreatment(preTreatment.build()) .withPriority(DEFAULT_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(VLAN_TABLE).build(); rules.add(preRule);
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(DEFAULT_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(TMAC_TABLE).build(); rules.add(rule); rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(DEFAULT_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(TMAC_TABLE).build(); rules.add(rule);
.withPriority(fwd.priority()) .forDevice(deviceId) .withSelector(sbuilder.build()) .withTreatment(ttBuilder.build()) .makePermanent() .forTable(ACL_TABLE); return Collections.singletonList(ruleBuilder.build());
.withSelector(selectorBuilder.build()) .withTreatment(treatmentBuilder.build()) .withPriority(intent.priority()) .fromApp(appId) .makePermanent() .build(); rules.add(rule); return rules; .withSelector(selectorBuilder.build()) .withTreatment(treatmentBuilder.build()) .withPriority(intent.priority()) .fromApp(appId) .makePermanent() .build(); selectorBuilder = DefaultTrafficSelector.builder(); .withSelector(selectorBuilder.build()) .withTreatment(treatmentLast.build()) .withPriority(intent.priority()) .fromApp(appId) .makePermanent() .build();
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(DEFAULT_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(TMAC_TABLE).build(); rules.add(rule); rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(DEFAULT_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(TMAC_TABLE).build(); rules.add(rule);
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(HIGHEST_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(ACL_TABLE).build(); ops = ops.add(rule);
.withSelector(flowRuleToInstall.selector()) .forDevice(flowRuleToInstall.deviceId()) .makePermanent() .withTreatment(flowRuleToInstall.treatment()) .fromApp(new DefaultApplicationId(flowRuleToInstall.appId(), "org.onosproject.net.intent")) .build();
FlowRule rule = DefaultFlowRule.builder() .forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(DEFAULT_PRIORITY) .fromApp(applicationId) .makePermanent() .forTable(FILTER_TABLE).build(); ops = ops.add(rule);
flowRuleBuilder.fromApp(fwd.appId()) .withPriority(fwd.priority()) .forDevice(deviceId) .withSelector(filteredSelector) .withTreatment(filteredTreatment) .forTable(BRIDGING_TABLE); if (fwd.permanent()) { flowRuleBuilder.makePermanent(); } else { flowRuleBuilder.makeTemporary(fwd.timeout()); rules.add(flowRuleBuilder.build()); return rules;