Brian O'Connor
Committed by Gerrit Code Review

ONOS-2381 Fixing intent purge command

We need to remove the current value.

Change-Id: Ib15f9b097e3df096b45367012d067973436e1d85
......@@ -281,6 +281,7 @@ public class IntentData { //FIXME need to make this "immutable"
return true;
case PURGE_REQ:
// TODO we should enforce that only WITHDRAWN intents can be purged
return true;
case COMPILING:
......
......@@ -180,7 +180,7 @@ public class GossipIntentStore
// Only the master is modifying the current state. Therefore assume
// this always succeeds
if (newData.state() == PURGE_REQ) {
currentMap.remove(newData.key(), newData);
currentMap.remove(newData.key(), currentData);
} else {
currentMap.put(newData.key(), new IntentData(newData));
}
......