[ONOS-3205] Migrate LLDP Link Discovery configuration to Network Configuration System
- deviceIds under suppression will be moved out to different location. (See ONOS-3461)
Change-Id: I6ebe0ce7f5f2d26e7ee7175974e19305f7c17fad
diff --git a/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/SuppressionRules.java b/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/SuppressionRules.java
index 27c75eb..9cda07c 100644
--- a/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/SuppressionRules.java
+++ b/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/SuppressionRules.java
@@ -18,6 +18,7 @@
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Objects;
import java.util.Set;
import org.onosproject.net.Annotations;
@@ -28,6 +29,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import com.google.common.base.MoreObjects;
public class SuppressionRules {
@@ -103,4 +105,34 @@
Map<String, String> getSuppressedAnnotation() {
return suppressedAnnotation;
}
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(suppressedDevice,
+ suppressedDeviceType,
+ suppressedAnnotation);
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (object != null && getClass() == object.getClass()) {
+ SuppressionRules that = (SuppressionRules) object;
+ return Objects.equals(this.suppressedDevice,
+ that.suppressedDevice)
+ && Objects.equals(this.suppressedDeviceType,
+ that.suppressedDeviceType)
+ && Objects.equals(this.suppressedAnnotation,
+ that.suppressedAnnotation);
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this)
+ .add("suppressedDevice", suppressedDevice)
+ .add("suppressedDeviceType", suppressedDeviceType)
+ .add("suppressedAnnotation", suppressedAnnotation)
+ .toString();
+ }
}