tom

Fixed a defect in device provider.

......@@ -18,7 +18,7 @@ public class DevicesListCommand extends AbstractShellCommand {
@Override
protected Object doExecute() throws Exception {
for (Device device : getService(DeviceService.class).getDevices()) {
print(FMT, device.id(), device.type(), device.manufacturer(),
print(FMT, device.id().uri(), device.type(), device.manufacturer(),
device.hwVersion(), device.swVersion(), device.serialNumber());
}
return null;
......
......@@ -21,15 +21,14 @@ public class LinksListCommand extends AbstractShellCommand {
required = false, multiValued = false)
String deviceId = null;
@Override
protected Object doExecute() throws Exception {
LinkService service = getService(LinkService.class);
Iterable<Link> links = deviceId != null ?
service.getDeviceLinks(deviceId(deviceId)) : service.getLinks();
for (Link link : links) {
print(FMT, link.src().deviceId(), link.src().port(),
link.dst().deviceId(), link.dst().port(), link.type());
print(FMT, link.src().deviceId().uri(), link.src().port(),
link.dst().deviceId().uri(), link.dst().port(), link.type());
}
return null;
}
......
......@@ -117,7 +117,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr
sw.manfacturerDescription(),
sw.hardwareDescription(),
sw.softwareDescription(),
sw.softwareDescription());
sw.serialNumber());
providerService.deviceConnected(deviceId(uri), description);
providerService.updatePorts(deviceId(uri), buildPortDescriptions(sw.getPorts()));
}
......