CNlucius
Committed by Gerrit Code Review

ONOS-2624

Fix host annotations of host description

Change-Id: I4822741e8cdef5c9620f5f2b8cf260fc0f523bf9
...@@ -125,7 +125,8 @@ public class ECHostStore ...@@ -125,7 +125,8 @@ public class ECHostStore
125 hostDescription.hwAddress(), 125 hostDescription.hwAddress(),
126 hostDescription.vlan(), 126 hostDescription.vlan(),
127 hostDescription.location(), 127 hostDescription.location(),
128 - ImmutableSet.copyOf(hostDescription.ipAddress())); 128 + ImmutableSet.copyOf(hostDescription.ipAddress()),
129 + hostDescription.annotations());
129 hosts.put(hostId, newhost); 130 hosts.put(hostId, newhost);
130 return new HostEvent(HOST_ADDED, newhost); 131 return new HostEvent(HOST_ADDED, newhost);
131 } 132 }
......
...@@ -36,6 +36,7 @@ import org.onosproject.net.Host; ...@@ -36,6 +36,7 @@ import org.onosproject.net.Host;
36 import org.onosproject.net.HostId; 36 import org.onosproject.net.HostId;
37 import org.onosproject.net.HostLocation; 37 import org.onosproject.net.HostLocation;
38 import org.onosproject.net.PortNumber; 38 import org.onosproject.net.PortNumber;
39 +import org.onosproject.net.SparseAnnotations;
39 import org.onosproject.net.host.DefaultHostDescription; 40 import org.onosproject.net.host.DefaultHostDescription;
40 import org.onosproject.net.host.HostDescription; 41 import org.onosproject.net.host.HostDescription;
41 import org.onosproject.net.host.HostProvider; 42 import org.onosproject.net.host.HostProvider;
...@@ -116,7 +117,7 @@ public class OvsdbHostProvider extends AbstractProvider implements HostProvider ...@@ -116,7 +117,7 @@ public class OvsdbHostProvider extends AbstractProvider implements HostProvider
116 .portNumber().value(), subject.portName().value()); 117 .portNumber().value(), subject.portName().value());
117 HostLocation loaction = new HostLocation(deviceId, portNumber, 118 HostLocation loaction = new HostLocation(deviceId, portNumber,
118 0L); 119 0L);
119 - DefaultAnnotations annotations = DefaultAnnotations.builder() 120 + SparseAnnotations annotations = DefaultAnnotations.builder()
120 .set("ifaceid", subject.ifaceid().value()).build(); 121 .set("ifaceid", subject.ifaceid().value()).build();
121 HostDescription hostDescription = new DefaultHostDescription( 122 HostDescription hostDescription = new DefaultHostDescription(
122 subject.hwAddress(), 123 subject.hwAddress(),
......