Master: cherry-pick changes for BUG-9223 30/64030/2
authorJalpa Modasiya <jmodasiy@luminanetworks.com>
Fri, 6 Oct 2017 19:58:09 +0000 (12:58 -0700)
committerJalpa Modasiya <jmodasiy@luminanetworks.com>
Tue, 10 Oct 2017 22:36:46 +0000 (22:36 +0000)
    Cherry-pick changes for BUG-9223 from stable/boron branch for remove hardcoded value of lldp interval
    Removed debug log from LLDPLinkAger.java

Change-Id: I95361679b6f12824f45e0ae31972d81485e23fc7
Signed-off-by: Jalpa Modasiya <jmodasiy@luminanetworks.com>
applications/topology-lldp-discovery/src/main/resources/org/opendaylight/blueprint/topology-lldp-discovery.xml
applications/topology-lldp-discovery/src/main/yang/topology-lldp-discovery-config.yang
openflowplugin-blueprint-config/src/main/resources/initial/openflowplugin.cfg

index 12ac1290ed9b42482ac2e5459256bea009b043b0..b549b1d7562edd98aee9cc370ebecc9e5522ba7e 100644 (file)
@@ -1,25 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
         odl:use-default-for-reference-types="true">
 
   <reference id="notificationService" interface="org.opendaylight.controller.sal.binding.api.NotificationProviderService"/>
-
   <odl:clustered-app-config id="topologyLLDPConfig"
-      binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig">
-    <odl:default-config><![CDATA[
+                              binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig">
+        <odl:default-config><![CDATA[
       <topology-lldp-discovery-config xmlns="urn:opendaylight:params:xml:ns:yang:topology-lldp-discovery:config">
         <lldp-secure-key>aa9251f8-c7c0-4322-b8d6-c3a84593bda3</lldp-secure-key>
       </topology-lldp-discovery-config>
     ]]></odl:default-config>
   </odl:clustered-app-config>
 
+  <cm:property-placeholder persistent-id="org.opendaylight.openflowplugin"
+                           update-strategy="none">
+    <cm:default-properties>
+      <!-- Interval to check LLDP links   -->
+      <cm:property name="topology-lldp-interval" value="5000"/>
+      <!-- Expiration interval for aging out links -->
+      <cm:property name="topology-lldp-expiration-interval" value="60000"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
   <bean id="lldpLinkAger" class="org.opendaylight.openflowplugin.applications.topology.lldp.LLDPLinkAger"
           destroy-method="close">
-    <!-- Interval to send LLDP (five seconds) -->
-    <argument value="5000"/>
-    <!-- Expiration interval for aging out links (3 * the interval)  -->
-    <argument value="15000"/>
+    <argument value="${topology-lldp-interval}"/>
+    <argument value="${topology-lldp-expiration-interval}"/>
     <argument ref="notificationService"/>
   </bean>
 
index 0e1189e4199f4b66bd6947f5cbcbc46b3a0b230d..205cb2754729ffb72bf949eb915a74f8b93814b4 100644 (file)
@@ -11,11 +11,30 @@ module topology-lldp-discovery-config {
             "Initial revision.";
     }
 
+    typedef non-zero-uint32-type {
+        type uint32 {
+             range "1..max";
+        }
+    }
+
     container topology-lldp-discovery-config {
         leaf lldp-secure-key {
             description "Provided key will be used to generate LLDP custom security hash";
             type string;
             mandatory true;
         }
+
+       leaf topology-lldp-interval {
+            description "Periodic interval for sending LLDP packet for link discovery";
+            type non-zero-uint32-type;
+            default 5000;
+        }
+
+       leaf topology-lldp-expiration-interval {
+            description "Timeout duration for LLDP response message";
+            type non-zero-uint32-type;
+            default 60000;
+       }
+
     }
 }
\ No newline at end of file
index 1f84b4fdc692463e1c0cee5349071125335f162e..f62fd85b7354bbbf24f8afcf0e2f4951fb0d9bda 100644 (file)
 # NOTE: This option will be effective only if disable_reconciliation=false.
 # bundle-based-reconciliation-enabled=false
 
+#############################################################################
+#                                                                           #
+#            Topology Lldp Discovery Configuration                          #
+#                                                                           #
+#############################################################################
+
+# Periodic interval for sending LLDP packet for link discovery
+# topology-lldp-interval=5000
 
+# Timeout duration for LLDP response message
+# topology-lldp-expiration-interval=60000