Management Software

Reply
Occasional Contributor
Posts: 8
Registered: ‎10-06-2014

BNA RestAPI fails to get access gateways.

[ Edited ]

Hi, 

 

BNA rest api (below) call fails to get the accessgateways. It fails with FileNotFound exception. 

 

>http://192.168.1.1/rest/resourcegroups/ALL/accessgateways

 

As per BNA Rest API doc, this call shoudl work.  Not sure why it's failing and there is no clue on REST API guide as to why this call is failing. 

 

Btw, there are accessgateways added to Network Advisor. In fact, I'm able to get the repsonse for the agconnections REST API call (below )successfully, but not the acessgateways mentioned above.. 

 

>http://192.168.1.1/rest/resourcegroups/All/agconnections

 

Could you please help.  

 

Also, the Network Advisor Rest API document doesn't mention on how to get the IP Address of the gateway. Is there a way to get the IP address of the gateway?

 

I'm using the BNA 14.1.

 

******

java.io.FileNotFoundException: http://192.168.1.1/rest/resourcegroups/ALL/accessgateways
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at restclient.RestClient.invokeREST(RestClient.java:78)
at restclient.RestClient.main(RestClient.java:162)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.io.FileNotFoundException: http://192.168.1.1/rest/resourcegroups/ALL/accessgateways
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at restclient.RestClient.invokeREST(RestClient.java:70)
... 6 more

 

Thanks,

Mahesh

Brocade Moderator
Posts: 304
Registered: ‎03-29-2011

Re: BNA RestAPI fails to get access gateways.

hi Mahesh,

 

you need to write All (and not ALL) - look like a documentation error, I will check.

 

http://192.168.1.1/rest/resourcegroups/All/accessgateways

 

I do not see any any way currently to get the IP address for the AccessGatway - it is missing the physicalswitches option for fcswitches.




If this provided you with a solution to this issue, please mark it with the button at the bottom "Accept as solution".


Any and all information provided by me is not reviewed, approved or endorsed by Brocade and is provided solely as a convenience for Brocade customers. All systems and all networks are different and unique. If you have a service affecting network problem, please open a TAC service request for service through Brocade, or through your OEM equipment provider. If this provided you with a solution to this issue, please mark it with the button at the bottom "Accept as solution"
Occasional Contributor
Posts: 8
Registered: ‎10-06-2014

Re: BNA RestAPI fails to get access gateways.

Thanks Martin - I had figured out that documentation mistake. 

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.