BUG-9223:Remove hardcoded value of lldp interval 80/63880/3 stable/boron
authorJalpa Modasiya <jmodasiy@luminanetworks.com>
Mon, 2 Oct 2017 17:40:44 +0000 (10:40 -0700)
committerJalpa Modasiya <jmodasiy@luminanetworks.com>
Tue, 3 Oct 2017 03:03:11 +0000 (20:03 -0700)
Addressed comments
Change-Id: I89e070df3c4d6cf91c9259064ac72832f58cd0e5
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 141cb63086c215523f8519ee17498d7056cddf65..a598134cb836dd9584dbf6a1aeeab58cf882fcdc 100644 (file)
 
 # Number of time forwarding rules manager should retry to reconcile any specific
 # configuration.
-# reconciliation-retry-count=5
\ No newline at end of file
+# reconciliation-retry-count=5
+
+
+#############################################################################
+#                                                                           #
+#            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
\ No newline at end of file