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

Revision history [back]

click to hide/show revision 1
initial version

Could not add flow via Rest API.

I use postman to post add-flow, but it failed. Could anyone tell what have I missed?

POST: http://{my-controller}/restconf/operations/sal-flow:add-flow Body

{ "add-flow": { "input": { "match": { "in-port": "1" }, "instructions": { "instruction": [ { "write-actions": { "action": [ { "set-field": { "tunnel": { "tunnel-id": "100" } } } ] } } ] }, "table_id": "0", "node": "openflow:112662899537729" } } }

Return message: { "errors": { "error": [ { "error-type": "protocol", "error-tag": "malformed-message", "error-message": "Error parsing input: Schema node with name add-flow wasn't found under (urn:opendaylight:flow:service?revision=2013-08-19)add-flow." } ] } }

Could not add flow via Rest API.

I use postman to post add-flow, but it failed. Could anyone tell what have I missed?

POST: http://{my-controller}/restconf/operations/sal-flow:add-flow Body

{ "add-flow": { "input": { "match": { "in-port": "1" }, "instructions": { "instruction": [ { "write-actions": { "action": [ { "set-field": { "tunnel": { "tunnel-id": "100" } } } ] } } ] }, "table_id": "0", "node": "openflow:112662899537729" } } }

Return message: { "errors": { "error": [ { "error-type": "protocol", "error-tag": "malformed-message", "error-message": "Error parsing input: Schema node with name add-flow wasn't found under (urn:opendaylight:flow:service?revision=2013-08-19)add-flow." } ] } }

Could not add flow via Rest API.

I use postman to post add-flow, but it failed. Could anyone tell what have I missed?

POST: http://{my-controller}/restconf/operations/sal-flow:add-flow Body

{

enter code here{
"add-flow": {
     "input": {
         "match": {
             "in-port": "1"
         },
         "instructions": {
             "instruction": [
                    {
    {
                    "write-actions": {
                         "action": [
                                {
    {
                                "set-field": {
                                     "tunnel": {
                                         "tunnel-id": "100"
                                        }
                                    }
                                }
    }
                                }
                            }
                        ]
                        }
                    }
    }
                }
            ]
         },
         "table_id": "0",
         "node": "openflow:112662899537729"
        }
    }
}
}
}

}

Return message: message:


{
  enter code here { "errors": {
 "error": [
      {
    {
    "error-type": "protocol",
     "error-tag": "malformed-message",
     "error-message": "Error parsing input: Schema node with name add-flow wasn't found under (urn:opendaylight:flow:service?revision=2013-08-19)add-flow."
      }
    ]
  }
}
(urn:opendaylight:flow:service?revision=2013-08-19)add-flow."}]}

Could not add flow via Rest API.

[edit] Ignore this one. The json format flow copy from YANG UI sal-flow, but can not work thru. At last I tried to use XML format flow. A related question resolved this issue.

I use postman to post add-flow, but it failed. Could anyone tell what have I missed?

POST: http://{my-controller}/restconf/operations/sal-flow:add-flow Body

enter code here{
"add-flow": {
    "input": {
        "match": {
            "in-port": "1"
        },
        "instructions": {
            "instruction": [
                {
                    "write-actions": {
                        "action": [
                            {
                                "set-field": {
                                    "tunnel": {
                                        "tunnel-id": "100"
                                    }
                                }
                            }
                        ]
                    }
                }
            ]
        },
        "table_id": "0",
        "node": "openflow:112662899537729"
    }
}

}

Return message:

enter code here { "errors": {
"error": [
  {
    "error-type": "protocol",
    "error-tag": "malformed-message",
    "error-message": "Error parsing input: Schema node with name add-flow wasn't found under (urn:opendaylight:flow:service?revision=2013-08-19)add-flow."}]}