[ONOS-6486] Fix serializer error and NPE of VplsStore
Change-Id: I134203c92eb9e3ce70673b17561cc74a66b1eca8
diff --git a/apps/vpls/src/main/java/org/onosproject/vpls/store/DistributedVplsStore.java b/apps/vpls/src/main/java/org/onosproject/vpls/store/DistributedVplsStore.java
index 1743491..6d58457 100644
--- a/apps/vpls/src/main/java/org/onosproject/vpls/store/DistributedVplsStore.java
+++ b/apps/vpls/src/main/java/org/onosproject/vpls/store/DistributedVplsStore.java
@@ -62,7 +62,9 @@
private static final KryoNamespace APP_KRYO = KryoNamespace.newBuilder()
.register(KryoNamespaces.API)
+ .register(Interface.class)
.register(VplsData.class)
+ .register(VplsData.VplsState.class)
.register(VplsOperation.class)
.build();
@@ -163,6 +165,10 @@
*/
public void writeVplsToNetConfig(Collection<VplsData> vplsDataCollection) {
VplsAppConfig config = networkConfigService.addConfig(appId, VplsAppConfig.class);
+ if (config == null) {
+ log.debug("VPLS config is not available now");
+ return;
+ }
config.clearVplsConfig();
// Setup update time for this VPLS application configuration