- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Rest API execution problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 06:25 AM
05-08-2014 06:25 AM
Rest API execution problem
Hi,
Our topology is one swicth connected to the controller and two machines connetcted with the swicth.
Ping is working file and flow has been also inserted on teh swicth.
We have downloaded (version 2.0)the trial version of HP VAN SDN Controller. We are doing hands on for the REST API output. We are getting some problem with the rest api which is mentioned below:
1-
REST API to get the device info but combination of vid and mac highlighted is not working.
~$ curl -sk -H "X-Auth-Token:5ed7886eabaa4aa2b36681cce11c9422" https://192.168.1.58:8443/sdn/v2.0/net/nodes/vid=0&ip="192.168.1.181"
sdn@sdn:~$ {"nodes":[{"ip":"192.168.1.191","mac":"00:22:cc:bb:bb:10","vid":0,"dpid":"00:00:00:07:e9:0f:5f:59","port":9},{"ip":"192.168.1.181","mac":"22:22:77:77:cc:10",
"vid":0,"dpid":"00:00:00:07:e9:0f:5f:59","port":5}]}
As per our understanding it should give the output of 192.168.1.181 host.We have tried with mac as well but it was also not working.
2-
sdn@sdn: ~^Gsdn@sdn:~$ curl -sk -H "X-Auth-Token:5ed7886eabaa4aa2b36681cce11c9422" https://192.168.1.58:8443/sdn/v2.0/net/paths/forward/
{"error":"java.lang.IllegalArgumentException","message":"source or destination datapath ID cannot be null."}sdn@sdn: ~^Gsdn@sdn:~$
^[]0;sdn@sdn: ~^Gsdn@sdn:~$ ^M
We were geeting the error please let us know what we are missing in this rest api.
3-
Is there any rest api so that we can get the queue stats (which we have created on OVS Swicth) with the help of that particular rest api?
Please let us know what we are missing or what we are doing wrong ?
Thanks in advance
Regards,
Prabhakar Rai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2014 04:52 PM
05-13-2014 04:52 PM
Re: Rest API execution problem
Prabakhar,
As for #1:
I have an example of what worked for me below.
(I've got the token and the UMS exported)
You'll need the backslash before the &, otherwise it will try to background what's to the left.
curl -sk -H "X-Auth-Token:$token" $UMS/sdn/v2.0/net/nodes?vid=0\&ip="10.0.0.1"
I'll see if I can look into questions #2 and #3 also.
Regards,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2014 04:14 AM
05-14-2014 04:14 AM
Re: Rest API execution problem
Hello Prabhakar,
For question no 1, you are missing a question mark which is used to provide the parameters . Also you have to use a backslash before the & as suggested by the Scott.
You should use the curl command with /sdn/v2.0/net/nodes?vid=0\&ip=" 192.168.1.181" instead of using with sdn/v2.0/net/nodes/vid=0&ip="192.168.1.181"
e.g. curl -sk -H "X-Auth-Token:$token" $UMS/v2.0/net/nodes?vid=0\&ip="10.0.0.1"
For question no.2 -As per REST API document [page 68] you should provide the values for mandatory parameters src_dpid and dst_dpid else you will get the error {"error":"java.lang.IllegalArgumentException","message":"source or destination datapath ID cannot be null."}
You can run curl command as
e.g. curl -sk -H "X-Auth-Token:$token" $UMS/v2.0/net/paths/forward?src_dpid="00:00:00:00:00:00:00:0d"\&dst_dpid="00:00:00:00:00:00:00:0b"
Please note that for above examples, we have exported token and UMS already.
Thanks,
HP SDN Team
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2014 07:59 AM
05-14-2014 07:59 AM
Re: Rest API execution problem
Can you show the output of this:
curl -sk -H "X-Auth-Token:$token" $UMS/sdn/v2.0/of/stats
And then we can get an idea of what stats you're looking for.
And perhaps the queue(s) that you've defined on the switch will show up.
Thanks,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2014 10:51 AM
06-02-2014 10:51 AM
Re: Rest API execution problem
Hello Prabhakar,
Doing a follow up to check if you get any chance to run the command as Scott had asked for.
If yes please do help us with the response of the command to take this further.
Please also let know if you have already resolved the issue
Thanks
HP SDN Team