Make PIM hello interval configurable on a per-interface basis.
Change-Id: I7a0788be4445c7befbd947a3df893bcce1118bf5
diff --git a/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceConfig.java b/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceConfig.java
index 8d8ad78..48969c3 100644
--- a/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceConfig.java
+++ b/apps/pim/src/main/java/org/onosproject/pim/impl/PimInterfaceConfig.java
@@ -28,6 +28,7 @@
private static final String INTERFACE_NAME = "interfaceName";
private static final String ENABLED = "enabled";
+ private static final String HELLO_INTERVAL = "helloInterval";
private static final String HOLD_TIME = "holdTime";
private static final String PRIORITY = "priority";
private static final String PROPAGATION_DELAY = "propagationDelay";
@@ -53,6 +54,18 @@
}
/**
+ * Gets the hello interval of the interface.
+ *
+ * @return hello interval
+ */
+ public Optional<Integer> getHelloInterval() {
+ if (node.path(HELLO_INTERVAL).isMissingNode()) {
+ return Optional.empty();
+ }
+ return Optional.of(Integer.parseInt(node.path(HELLO_INTERVAL).asText()));
+ }
+
+ /**
* Gets the HELLO hold time of the interface.
*
* @return hold time