Charles Chan
Committed by Gerrit Code Review

Include annotation when comparing two hosts

Change-Id: Idea24f1057fdbd7a62b9066d2233cadf7b58b31d
...@@ -99,7 +99,8 @@ public class DefaultHost extends AbstractElement implements Host { ...@@ -99,7 +99,8 @@ public class DefaultHost extends AbstractElement implements Host {
99 Objects.equals(this.mac, other.mac) && 99 Objects.equals(this.mac, other.mac) &&
100 Objects.equals(this.vlan, other.vlan) && 100 Objects.equals(this.vlan, other.vlan) &&
101 Objects.equals(this.location, other.location) && 101 Objects.equals(this.location, other.location) &&
102 - Objects.equals(this.ipAddresses(), other.ipAddresses()); 102 + Objects.equals(this.ipAddresses(), other.ipAddresses()) &&
103 + Objects.equals(this.annotations(), other.annotations());
103 } 104 }
104 return false; 105 return false;
105 } 106 }
...@@ -107,11 +108,12 @@ public class DefaultHost extends AbstractElement implements Host { ...@@ -107,11 +108,12 @@ public class DefaultHost extends AbstractElement implements Host {
107 @Override 108 @Override
108 public String toString() { 109 public String toString() {
109 return toStringHelper(this) 110 return toStringHelper(this)
110 - .add("id", id) 111 + .add("id", id())
111 - .add("mac", mac) 112 + .add("mac", mac())
112 - .add("vlan", vlan) 113 + .add("vlan", vlan())
113 - .add("location", location) 114 + .add("location", location())
114 - .add("ipAddresses", ips) 115 + .add("ipAddresses", ipAddresses())
116 + .add("annotations", annotations())
115 .toString(); 117 .toString();
116 } 118 }
117 119
......