auto-config-transport-zones has incorrect default 87/79187/1
authorVishal Thapar <vthapar@redhat.com>
Thu, 3 Jan 2019 15:22:27 +0000 (20:52 +0530)
committerVishal Thapar <vthapar@redhat.com>
Thu, 3 Jan 2019 15:22:27 +0000 (20:52 +0530)
Fix for NETVIRT-1009 modified the default in config
file for auto-config-transport-zones to false. But
it missed changing in yang file. When a param is
missing in config file, it picks off yang defaults.
This caused a discrepency in behavior due to conflicting
defaults between two.

This fixes yang default to reflect the config default
as per NETVIRT-1009.

This also fixes the log message for two listeners which
used this flag and were misleading.

Change-Id: Ic1b85b798eedd6a14a80eb6145b5a23f73923fdc
JIRA: NETVIRT-1546
Signed-off-by: Vishal Thapar <vthapar@redhat.com>
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanDpnToTransportZoneListener.java
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/VpnDpnToTransportZoneListener.java
elanmanager/impl/src/main/yang/elanmanager-config.yang

index baf8711d9fcec50f303ee8e94b53fcc4c73ac72e..22da9962a6c32a71d8b21493c8f318de4c467b2d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 HPE and others.  All rights reserved.
+ * Copyright (c) 2017, 2019 HPE and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -47,10 +47,10 @@ public class ElanDpnToTransportZoneListener
 
     @PostConstruct
     public void start() {
-        LOG.info("{} start", getClass().getSimpleName());
 
         if (useTransportZone) {
             registerListener(LogicalDatastoreType.OPERATIONAL, dbx);
+            LOG.info("{} registered", getClass().getSimpleName());
         }
     }
 
index e8b57ad179cfdf79300842175f0f15110836d35e..723e2d4534bfdc00a2179269f39a0e4a8f80e62d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 HPE and others.  All rights reserved.
+ * Copyright (c) 2017, 2019 HPE and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -42,10 +42,10 @@ public class VpnDpnToTransportZoneListener
 
     @PostConstruct
     public void start() {
-        LOG.info("{} start", getClass().getSimpleName());
 
         if (useTransportZone) {
             registerListener(LogicalDatastoreType.OPERATIONAL, dbx);
+            LOG.info("{} registered", getClass().getSimpleName());
         }
     }
 
index b2961cf0c43064791fa3ddfd4968e731d6e10341..9ba91afa9b7549344a3b712c537d98d9fda34a6e 100644 (file)
@@ -56,7 +56,7 @@ module elan-config {
         leaf auto-config-transport-zones {
             description "Determines whether transport zones should be automatically created/updated";
             type boolean;
-            default true;
+            default false;
         }
         leaf use-of-tunnels {
             type boolean;