Software Defined Networking
1752790 Members
6241 Online
108789 Solutions
New Discussion

Not able to get the connected devices (i.e. switches) details by using getDevices() API

 
Chethan_R
Occasional Advisor

Not able to get the connected devices (i.e. switches) details by using getDevices() API

Hi All,
 
I am trying to get the connected devices (OpenFlow supported Switches) details by using the API getDevices() which is defined in Class DeviceServiceAdapter(). But unfortunately this API is returning the value “null” when calling from Internal Application. Tried getDevice (DataPathId dpid) and getDevices(IpAddress deviceIp) APIs, but these APIs also returning value “null”.
 
The connected switches firmware version is V1.3
 
Earlier this switch was upgraded with firmware which supports OpenFlow V1.0. So, I thought that there may be compatibility issues as the OpenFlow protocol version is older. So, I have upgraded to the firmware which supports OpenFlow V1.3, but still the above mentioned APIs returns value “null” which confirms that the issue is not with compatibility or OpenFlow version.
 
Code snippet for reference:
 
DeviceServiceAdapter DSA = new DeviceServiceAdapter();
logger.info("Devices: " + DSA.getDevices());
 
Output Observed:
 
Devices: null
 
Kindly suggest me that how to get connected devices details from Internal Application.
 
Thanks in advance.
 
Regards,
Chethan