Showing
3 changed files
with
4 additions
and
5 deletions
... | @@ -18,7 +18,7 @@ public class DevicesListCommand extends AbstractShellCommand { | ... | @@ -18,7 +18,7 @@ public class DevicesListCommand extends AbstractShellCommand { |
18 | @Override | 18 | @Override |
19 | protected Object doExecute() throws Exception { | 19 | protected Object doExecute() throws Exception { |
20 | for (Device device : getService(DeviceService.class).getDevices()) { | 20 | for (Device device : getService(DeviceService.class).getDevices()) { |
21 | - print(FMT, device.id(), device.type(), device.manufacturer(), | 21 | + print(FMT, device.id().uri(), device.type(), device.manufacturer(), |
22 | device.hwVersion(), device.swVersion(), device.serialNumber()); | 22 | device.hwVersion(), device.swVersion(), device.serialNumber()); |
23 | } | 23 | } |
24 | return null; | 24 | return null; | ... | ... |
... | @@ -21,15 +21,14 @@ public class LinksListCommand extends AbstractShellCommand { | ... | @@ -21,15 +21,14 @@ public class LinksListCommand extends AbstractShellCommand { |
21 | required = false, multiValued = false) | 21 | required = false, multiValued = false) |
22 | String deviceId = null; | 22 | String deviceId = null; |
23 | 23 | ||
24 | - | ||
25 | @Override | 24 | @Override |
26 | protected Object doExecute() throws Exception { | 25 | protected Object doExecute() throws Exception { |
27 | LinkService service = getService(LinkService.class); | 26 | LinkService service = getService(LinkService.class); |
28 | Iterable<Link> links = deviceId != null ? | 27 | Iterable<Link> links = deviceId != null ? |
29 | service.getDeviceLinks(deviceId(deviceId)) : service.getLinks(); | 28 | service.getDeviceLinks(deviceId(deviceId)) : service.getLinks(); |
30 | for (Link link : links) { | 29 | for (Link link : links) { |
31 | - print(FMT, link.src().deviceId(), link.src().port(), | 30 | + print(FMT, link.src().deviceId().uri(), link.src().port(), |
32 | - link.dst().deviceId(), link.dst().port(), link.type()); | 31 | + link.dst().deviceId().uri(), link.dst().port(), link.type()); |
33 | } | 32 | } |
34 | return null; | 33 | return null; |
35 | } | 34 | } | ... | ... |
providers/of/device/src/main/java/org/onlab/onos/provider/of/device/impl/OpenFlowDeviceProvider.java
... | @@ -117,7 +117,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr | ... | @@ -117,7 +117,7 @@ public class OpenFlowDeviceProvider extends AbstractProvider implements DevicePr |
117 | sw.manfacturerDescription(), | 117 | sw.manfacturerDescription(), |
118 | sw.hardwareDescription(), | 118 | sw.hardwareDescription(), |
119 | sw.softwareDescription(), | 119 | sw.softwareDescription(), |
120 | - sw.softwareDescription()); | 120 | + sw.serialNumber()); |
121 | providerService.deviceConnected(deviceId(uri), description); | 121 | providerService.deviceConnected(deviceId(uri), description); |
122 | providerService.updatePorts(deviceId(uri), buildPortDescriptions(sw.getPorts())); | 122 | providerService.updatePorts(deviceId(uri), buildPortDescriptions(sw.getPorts())); |
123 | } | 123 | } | ... | ... |
-
Please register or login to post a comment