Ray Milkey

ONOS-792 Implement Unit Tests for Links and Devices REST APIs

Also added a missing attribute to the Devices codec

Change-Id: I824a3559ca6278297a52169249f413c850204a9b
......@@ -33,12 +33,14 @@ public class DeviceCodec extends AnnotatedCodec<Device> {
DeviceService service = context.get(DeviceService.class);
ObjectNode result = context.mapper().createObjectNode()
.put("id", device.id().toString())
.put("type", device.type().name())
.put("available", service.isAvailable(device.id()))
.put("role", service.getRole(device.id()).toString())
.put("mfr", device.manufacturer())
.put("hw", device.hwVersion())
.put("sw", device.swVersion())
.put("serial", device.serialNumber());
.put("serial", device.serialNumber())
.put("chassisId", device.chassisId().toString());
return annotate(result, device, context);
}
......