Pavlin Radoslavov

Updated some of the SDN-IP log messages inside the IntentSynchronizer.

Also, fixed a typo in file TestIntentServiceHelper.java

Change-Id: I0c0f7ad0f5e02f80465fb643184e20924fd49153
...@@ -316,6 +316,12 @@ public class IntentSynchronizer { ...@@ -316,6 +316,12 @@ public class IntentSynchronizer {
316 } 316 }
317 fetchedIntents.put(new IntentKey(intent), intent); 317 fetchedIntents.put(new IntentKey(intent), intent);
318 } 318 }
319 + if (log.isDebugEnabled()) {
320 + for (Intent intent: fetchedIntents.values()) {
321 + log.debug("SDN-IP Intent Synchronizer: fetched intent: {}",
322 + intent);
323 + }
324 + }
319 325
320 computeIntentsDelta(localIntents, fetchedIntents, 326 computeIntentsDelta(localIntents, fetchedIntents,
321 storeInMemoryIntents, addIntents, 327 storeInMemoryIntents, addIntents,
...@@ -370,6 +376,8 @@ public class IntentSynchronizer { ...@@ -370,6 +376,8 @@ public class IntentSynchronizer {
370 intent); 376 intent);
371 } 377 }
372 if (!isElectedLeader) { 378 if (!isElectedLeader) {
379 + log.debug("SDN-IP Intent Synchronizer: cannot withdraw intents: " +
380 + "not elected leader anymore");
373 isActivatedLeader = false; 381 isActivatedLeader = false;
374 return; 382 return;
375 } 383 }
...@@ -380,14 +388,16 @@ public class IntentSynchronizer { ...@@ -380,14 +388,16 @@ public class IntentSynchronizer {
380 builder = IntentOperations.builder(); 388 builder = IntentOperations.builder();
381 for (Intent intent : addIntents) { 389 for (Intent intent : addIntents) {
382 builder.addSubmitOperation(intent); 390 builder.addSubmitOperation(intent);
391 + log.debug("SDN-IP Intent Synchronizer: submitting intent: {}",
392 + intent);
383 } 393 }
384 if (!isElectedLeader) { 394 if (!isElectedLeader) {
395 + log.debug("SDN-IP Intent Synchronizer: cannot submit intents: " +
396 + "not elected leader anymore");
385 isActivatedLeader = false; 397 isActivatedLeader = false;
386 return; 398 return;
387 } 399 }
388 intentOperations = builder.build(); 400 intentOperations = builder.build();
389 - log.debug("SDN-IP Intent Synchronizer: submitting intents: {}",
390 - intentOperations);
391 intentService.execute(intentOperations); 401 intentService.execute(intentOperations);
392 402
393 if (isElectedLeader) { 403 if (isElectedLeader) {
......
...@@ -48,7 +48,7 @@ public final class TestIntentServiceHelper { ...@@ -48,7 +48,7 @@ public final class TestIntentServiceHelper {
48 } 48 }
49 49
50 /* 50 /*
51 - * EasyMock matcher that matches {@link Inten} but 51 + * EasyMock matcher that matches {@link Intent} but
52 * ignores the {@link IntentId} when matching. 52 * ignores the {@link IntentId} when matching.
53 * <p/> 53 * <p/>
54 * The normal intent equals method tests that the intent IDs are equal, 54 * The normal intent equals method tests that the intent IDs are equal,
......