Software Defined Networking
1753535 Members
7321 Online
108795 Solutions
New Discussion

Re: Swagger error: [unable to parse as json; raw response below]

 
SOLVED
Go to solution
RGBD
Occasional Advisor

Swagger error: [unable to parse as json; raw response below]

Posting the following flow below it appears in the controller, but I get this error message:

 

 [unable to parse as json; raw response below]

 

Flare version:  01.13.00.2877

 

Flow json is:

 

{"flow": {
    "priority": 30000,
    "idle_timeout": 10,
      "match": [
        {
          "in_port": 13
        }
      ],
    "actions": [{"output": 14}]
}}

 

Returned flow from controller:

 


{
  "version": "1.0.0",
  "flows": [
    {
      "duration_sec": 300,
      "duration_nsec": 4000,
      "priority": 30000,
      "idle_timeout": 10,
      "hard_timeout": 0,
      "cookie": "0x0",
      "packet_count": 2341,
      "byte_count": 134232425,
      "match": [
        {
          "in_port": 13
        }
      ],
      "actions": [
        {
          "output": 14
        }
      ]
    }
  ]
}

 

4 REPLIES 4
kobisamoray
Occasional Advisor

Re: Swagger error: [unable to parse as json; raw response below]

Which OpenFlow switch are you using?

If switch uses OpenFlow 1.3, you have to use 1.3 notation.

RGBD
Occasional Advisor

Re: Swagger error: [unable to parse as json; raw response below]

E 3800:

 


3800B# show version
Image stamp:
 /ws/swbuildm/KA_rel_irvine_qaoff/code/build/tam(swbuildm_KA_rel_irvine_qaoff_re
l_irvine)
                Jun 27 2013 10:14:24
                KA.15.10.0016
                702
Boot Image:     Secondary
3800B#

 

Can you provide/point to OF v1.0 format?

Shaila
Advisor

Re: Swagger error: [unable to parse as json; raw response below]

 From flow response it looks like switch supports openflow version1.0.0 (This can be verified by getting all datapaths from Swagger UI. Check the negotiated_version in response json) 

 

Please let me know which of the following steps fail while adding a flow.

1) Posting the following flow from Swagger UI:

 

{"flow": {
    "priority": 30000,
    "idle_timeout": 10,
      "match": [
        {
          "in_port": 13
        }
      ],
    "actions": [{"output": 14}]
}}

 

Response from the controller

 

          Response code : 201

 

          Response Body : [unable to parse as json; raw response below]

 

(Actual response body for this action is nothing)

 

3) Verifying if the flow is added on the datapath.

 

4) Getting flows for the datapath from Swagger UI

 

Response:

 
{
  "version": "1.0.0",
  "flows": [
    {
      "duration_sec": 300,
      "duration_nsec": 4000,
      "priority": 30000,
      "idle_timeout": 10,
      "hard_timeout": 0,
      "cookie": "0x0",
      "packet_count": 2341,
      "byte_count": 134232425,
      "match": [
        {
          "in_port": 13
        }
      ],
      "actions": [
        {
          "output": 14
        }
      ]
    }
  ]
}

-- HP SDN Team
Shaila
Advisor
Solution

Re: Swagger error: [unable to parse as json; raw response below]

I tried to insert the suggested flow from swagger UI. I can see the flow on controller and datapath. But UI returns an error [unable to parse as json; raw response below] in response body with a response code of 201 (created).

 

For now, Please ignore the error string. Swagger UI is trying to parse an empty Json response and fails. This has no impact on flow insertion.

-- HP SDN Team