mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-23 21:31:00 +02:00
ONOS-2381 Fixing intent purge command
We need to remove the current value. Change-Id: Ib15f9b097e3df096b45367012d067973436e1d85
This commit is contained in:
parent
8040176c31
commit
597934f755
@ -281,6 +281,7 @@ public class IntentData { //FIXME need to make this "immutable"
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case PURGE_REQ:
|
case PURGE_REQ:
|
||||||
|
// TODO we should enforce that only WITHDRAWN intents can be purged
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case COMPILING:
|
case COMPILING:
|
||||||
|
|||||||
@ -180,7 +180,7 @@ public class GossipIntentStore
|
|||||||
// Only the master is modifying the current state. Therefore assume
|
// Only the master is modifying the current state. Therefore assume
|
||||||
// this always succeeds
|
// this always succeeds
|
||||||
if (newData.state() == PURGE_REQ) {
|
if (newData.state() == PURGE_REQ) {
|
||||||
currentMap.remove(newData.key(), newData);
|
currentMap.remove(newData.key(), currentData);
|
||||||
} else {
|
} else {
|
||||||
currentMap.put(newData.key(), new IntentData(newData));
|
currentMap.put(newData.key(), new IntentData(newData));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user