minor changes in l3vpn and patch-yang-libs
Change-Id: I0c267da8da72ad3ffc19f00d8902f1d7b3ed0b8b
diff --git a/apps/l3vpn/netl3vpn/src/main/java/org/onosproject/l3vpn/netl3vpn/impl/NetL3vpnManager.java b/apps/l3vpn/netl3vpn/src/main/java/org/onosproject/l3vpn/netl3vpn/impl/NetL3vpnManager.java
index e911000..6121d7b 100644
--- a/apps/l3vpn/netl3vpn/src/main/java/org/onosproject/l3vpn/netl3vpn/impl/NetL3vpnManager.java
+++ b/apps/l3vpn/netl3vpn/src/main/java/org/onosproject/l3vpn/netl3vpn/impl/NetL3vpnManager.java
@@ -195,7 +195,6 @@
private ResourceId module;
private ResourceId sites;
private boolean isElectedLeader = false;
- private boolean isActivatedLeader = false;
@Activate
protected void activate() {
@@ -320,7 +319,7 @@
* @param storeId store resource id
*/
private void processCreateFromStore(ResourceId storeId) {
- if (isElectedLeader && isActivatedLeader) {
+ if (isElectedLeader) {
List<ModelObject> objects = getModelObjects(storeId, module);
for (ModelObject obj : objects) {
if (obj instanceof DefaultL3VpnSvc) {
@@ -338,7 +337,7 @@
* @param storeId store resource id
*/
private void processDeleteFromStore(ResourceId storeId) {
- if (isElectedLeader && isActivatedLeader) {
+ if (isElectedLeader) {
//TODO: add delete logic here.
}
}
@@ -918,15 +917,7 @@
*/
private void leaderChanged(boolean isLeader) {
log.debug("Leader changed: {}", isLeader);
-
- if (!isLeader) {
- isElectedLeader = false;
- isActivatedLeader = false;
- // Nothing to do
- return;
- }
- isActivatedLeader = false;
- isElectedLeader = true;
+ isElectedLeader = isLeader;
}
/**