Inherit resources from a high level intent when creating a FlowRuleIntent
Make constructor without resources argument deprecated
Change-Id: I400cedfb2ec5f8ec3217e4729d95b075ceb0b025
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 72077f9..e4f144d 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
@@ -104,7 +104,7 @@
for (DeviceId deviceId: outputPorts.keys()) {
rules.addAll(createRules(intent, deviceId, inputPorts.get(deviceId), outputPorts.get(deviceId)));
}
- return Arrays.asList(new FlowRuleIntent(appId, rules));
+ return Arrays.asList(new FlowRuleIntent(appId, rules, intent.resources()));
}
private List<FlowRule> createRules(LinkCollectionIntent intent, DeviceId deviceId,