Ignore irrelevant events in SegmentRoutingManager and DhcpRelayManager

Change-Id: If2ec29d6eea07a187e42bd2fda32de17245a7520
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java
index 123c4b1..1cd9764 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java
+++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/DhcpRelayManager.java
@@ -498,7 +498,17 @@
                     log.warn("Unsupported event type {}", event.type());
                     break;
             }
+        }
 
+        @Override
+        public boolean isRelevant(NetworkConfigEvent event) {
+            if (event.configClass().equals(DefaultDhcpRelayConfig.class) ||
+                    event.configClass().equals(IndirectDhcpRelayConfig.class) ||
+                    event.configClass().equals(IgnoreDhcpConfig.class)) {
+                return true;
+            }
+            log.debug("Ignore irrelevant event class {}", event.configClass().getName());
+            return false;
         }
     }
 
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index 6f2507f..f955857 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -1630,6 +1630,19 @@
             }
         }
 
+        @Override
+        public boolean isRelevant(NetworkConfigEvent event) {
+            if (event.configClass().equals(SegmentRoutingDeviceConfig.class) ||
+                    event.configClass().equals(SegmentRoutingAppConfig.class) ||
+                    event.configClass().equals(InterfaceConfig.class) ||
+                    event.configClass().equals(XConnectConfig.class) ||
+                    event.configClass().equals(PwaasConfig.class)) {
+                return true;
+            }
+            log.debug("Ignore irrelevant event class {}", event.configClass().getName());
+            return false;
+        }
+
         private final class ConfigChange implements Runnable {
             @Override
             public void run() {