Porting intent changes to sample apps.
Change-Id: I6d2decfc59d61c5b9f4648a556b5a188f6633e83
diff --git a/calendar/src/main/java/org/onosproject/calendar/BandwidthCalendarResource.java b/calendar/src/main/java/org/onosproject/calendar/BandwidthCalendarResource.java
index ac02290..f9f1cf1 100644
--- a/calendar/src/main/java/org/onosproject/calendar/BandwidthCalendarResource.java
+++ b/calendar/src/main/java/org/onosproject/calendar/BandwidthCalendarResource.java
@@ -98,7 +98,7 @@
@PathParam("latency") String latency) {
log.info("Path Constraints: Src = {} SrcPort = {} Dest = {} DestPort = {} " +
- "BW = {} latency = {}",
+ "BW = {} latency = {}",
src, srcPort, dst, dstPort, bandwidth, latency);
if (src == null || dst == null || srcPort == null || dstPort == null) {
@@ -231,12 +231,14 @@
HostId srcPoint = HostId.hostId(src);
HostId dstPoint = HostId.hostId(dst);
return new HostToHostIntent(appId(), key, srcPoint, dstPoint,
- selector, treatment, constraints);
+ selector, treatment, constraints,
+ Intent.DEFAULT_INTENT_PRIORITY);
} else {
ConnectPoint srcPoint = new ConnectPoint(deviceId(src), portNumber(srcPort));
ConnectPoint dstPoint = new ConnectPoint(deviceId(dst), portNumber(dstPort));
return new TwoWayP2PIntent(appId(), key, srcPoint, dstPoint,
- selector, treatment, constraints);
+ selector, treatment, constraints,
+ Intent.DEFAULT_INTENT_PRIORITY);
}
}
@@ -248,7 +250,7 @@
* @return true if operation succeed, false otherwise
*/
private boolean submitIntent(Intent intent)
- throws InterruptedException {
+ throws InterruptedException {
IntentService service = get(IntentService.class);
CountDownLatch latch = new CountDownLatch(1);
diff --git a/demo/src/main/java/org/onosproject/demo/DemoInstaller.java b/demo/src/main/java/org/onosproject/demo/DemoInstaller.java
index 7407258..04c081b 100644
--- a/demo/src/main/java/org/onosproject/demo/DemoInstaller.java
+++ b/demo/src/main/java/org/onosproject/demo/DemoInstaller.java
@@ -177,9 +177,9 @@
//check that we do not have a random installer running
if (installWorker == null || installWorker.isShutdown()) {
installWorker = Executors.newFixedThreadPool(1,
- new ThreadFactoryBuilder()
- .setNameFormat("random-worker")
- .build());
+ new ThreadFactoryBuilder()
+ .setNameFormat("random-worker")
+ .build());
log.debug("Installing random sequence of intents");
randomInstaller = new RandomInstaller(runParams);
installWorker.execute(randomInstaller);
@@ -214,7 +214,8 @@
for (Host dst : hosts) {
HostToHostIntent intent = new HostToHostIntent(appId, src.id(), dst.id(),
selector, treatment,
- constraint);
+ constraint,
+ Intent.DEFAULT_INTENT_PRIORITY);
existingIntents.add(intent);
intentService.submit(intent);
}
@@ -414,7 +415,8 @@
this.src = src;
this.dst = dst;
this.intent = new HostToHostIntent(appId, src.id(), dst.id(),
- selector, treatment, constraint);
+ selector, treatment, constraint,
+ Intent.DEFAULT_INTENT_PRIORITY);
}
public HostToHostIntent h2hIntent() {