Include annotation when comparing two hosts
Change-Id: Idea24f1057fdbd7a62b9066d2233cadf7b58b31d
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultHost.java b/core/api/src/main/java/org/onosproject/net/DefaultHost.java
index 557fa5c..1e6cad9 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultHost.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultHost.java
@@ -99,7 +99,8 @@
Objects.equals(this.mac, other.mac) &&
Objects.equals(this.vlan, other.vlan) &&
Objects.equals(this.location, other.location) &&
- Objects.equals(this.ipAddresses(), other.ipAddresses());
+ Objects.equals(this.ipAddresses(), other.ipAddresses()) &&
+ Objects.equals(this.annotations(), other.annotations());
}
return false;
}
@@ -107,11 +108,12 @@
@Override
public String toString() {
return toStringHelper(this)
- .add("id", id)
- .add("mac", mac)
- .add("vlan", vlan)
- .add("location", location)
- .add("ipAddresses", ips)
+ .add("id", id())
+ .add("mac", mac())
+ .add("vlan", vlan())
+ .add("location", location())
+ .add("ipAddresses", ipAddresses())
+ .add("annotations", annotations())
.toString();
}