Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


How to test ping application using curl

asked 2015-03-24 22:35:31 -0700

saksh gravatar image

updated 2015-03-24 22:39:27 -0700

Hello All,

I am trying to create ping application by following the link below -

I am able to create ping application and the karaf version is showing ping application active but I am not able to test this ping application using the instructions given as follows -

With the following headers:
Content-Type: application/yang.operation+json
Cache-Control: no-cache
and the data set to raw Json encoded data (for POSTMAN at least) 
{ "input" : { "destination" : "" } } Note: Replace the IP address with the IP address that you want to   ping.

The error I am getting is -

HTTP/1.1 400 Bad Request
Content-Type: text/html;charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1403
Server: Jetty(8.1.14.v20131031)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-24 22:51:19 -0700

saksh gravatar image

I tried this to test the application -

curl -v -H "Content-Type:application/json" -X POST -u admin:admin -d "{input: {destination:}}" http://localhost:8080/restconf/operations/ping:send-echo

But this is also not working. Please let me know what is the error.

* Hostname was NOT found in DNS cache
*   Trying
* Connected to localhost ( port 8080 (#0)
* Server auth using Basic with user 'admin'
> POST /restconf/operations/ping:send-echo HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.35.0
> Host: localhost:8080
> Accept: */*
> Content-Type:application/json
> Content-Length: 33
*  upload completely sent off: 33 out of 33 bytes
< HTTP/1.1 501 Not Implemented
< Content-Type: application/json
< Transfer-Encoding: chunked
* Server Jetty(8.1.14.v20131031) is not blacklisted
< Server: Jetty(8.1.14.v20131031)
   "errors": {
       "error": [
                "error-type": "rpc",
                "error-tag": "operation-not-supported",
                "error-message": "No implementation for this operation is available."
 * Connection #0 to host localhost left intact
edit flag offensive delete publish link more


Can you check if your ping application is running or not? Try 'bundle:list | grep ping'

Vishal Thapar ( 2015-03-26 04:26:22 -0700 )edit
Login/Signup to Answer


Asked: 2015-03-24 22:35:31 -0700

Seen: 862 times

Last updated: Mar 24 '15