Marc De Leenheer
Committed by Gerrit Code Review

Protocol annotation for REST and NETCONF device providers.

Change-Id: Ib68011c1c88ab7325df329933ca94b865530d1b4
......@@ -26,6 +26,7 @@ import org.onlab.packet.ChassisId;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.incubator.net.config.basics.ConfigException;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.Device;
import org.onosproject.net.DeviceId;
......@@ -171,7 +172,9 @@ public class NetconfDeviceProvider extends AbstractProvider
ChassisId cid = new ChassisId();
String ipAddress = nodeId.ip().toString();
SparseAnnotations annotations = DefaultAnnotations.builder()
.set(IPADDRESS, ipAddress).build();
.set(IPADDRESS, ipAddress)
.set(AnnotationKeys.PROTOCOL, SCHEME_NAME.toUpperCase())
.build();
DeviceDescription deviceDescription = new DefaultDeviceDescription(
deviceId.uri(),
Device.Type.SWITCH,
......
......@@ -26,6 +26,7 @@ import org.onlab.packet.ChassisId;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.incubator.net.config.basics.ConfigException;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.Device;
import org.onosproject.net.DeviceId;
......@@ -178,7 +179,9 @@ public class RestDeviceProvider extends AbstractProvider
ChassisId cid = new ChassisId();
String ipAddress = nodeId.ip().toString();
SparseAnnotations annotations = DefaultAnnotations.builder()
.set(IPADDRESS, ipAddress).build();
.set(IPADDRESS, ipAddress)
.set(AnnotationKeys.PROTOCOL, REST.toUpperCase())
.build();
DeviceDescription deviceDescription = new DefaultDeviceDescription(
deviceId.uri(),
Device.Type.SWITCH,
......