Remove deprecated Flow Rule constructors
Change-Id: I2a078cbfbeb9db4a04ef1c59acde2fb45672a3cf
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
index 9085f08..43a7fb7 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
@@ -135,7 +135,7 @@
}
DefaultFlowRule rule = new DefaultFlowRule(deviceId, selector, treatment, 123, appId,
- new DefaultGroupId((short) (intent.id().fingerprint() & 0xffff)), 0, true);
+ new DefaultGroupId((short) (intent.id().fingerprint() & 0xffff)), 0, true, null);
rules.add(rule);
}
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
index d6eae35..f9e445a 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
@@ -256,6 +256,13 @@
protected FlowRule createFlowRule(MplsPathIntent intent, DeviceId deviceId,
TrafficSelector selector, TrafficTreatment treat) {
- return new DefaultFlowRule(deviceId, selector, treat, intent.priority(), appId, 0, true);
+ return DefaultFlowRule.builder()
+ .forDevice(deviceId)
+ .withSelector(selector)
+ .withTreatment(treat)
+ .withPriority(intent.priority())
+ .fromApp(appId)
+ .makePermanent()
+ .build();
}
}
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
index d6187cd..90e3981 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
@@ -97,7 +97,14 @@
}
TrafficTreatment treatment = treatmentBuilder.setOutput(egress.port()).build();
- return new DefaultFlowRule(ingress.deviceId(), selector, treatment, 123, appId, 0, true);
+ return DefaultFlowRule.builder()
+ .forDevice(ingress.deviceId())
+ .withSelector(selector)
+ .withTreatment(treatment)
+ .withPriority(123)
+ .fromApp(appId)
+ .makePermanent()
+ .build();
}
private boolean isLast(List<Link> links, int i) {