Add meter to Openflow node in Opendaylight

80 Views Asked by At

I am trying to add a meter over rest in Opendaylight to configure the bandwidth of a particular flow entry. I am not able to do this at this time. I do not know what the problem is. Is it the node below that I have specified incorrectly? I am using mininet with openvswitch and Openflow 1.3. openflow:1 is my switch 1.I use the apidoc website for test configuration of Opendaylight: [IP:8181/apidoc/explorer/index.html#/].

After installing the features "odl-restconf-all odl-openflowplugin-flow-services-rest odl-openflowplugin-app-table-miss-enforcer odl-openflowplugin-nxm-extensions" among others after this website: Opendaylight-doc: OpenFlow Plugin Installation, under sal-meter I can use this principle:Opendaylight-doc: Example of flow programming by using RPC operation just add a meter without downloading the complete configuration and then updating it, if I understand correctly. However, I always get an errorcode 500. What am I doing wrong? Mininet with the switches and a few flows run in the background and are also applied.

My configuration:

{
  "input": {
    "meter-id": 1,
    "meter-name": "256kbpsrate",
    "flags": "meter-kbps",
    "meter-band-headers": {
      "meter-band-header": [
        {
          "band-id": 0,
          "meter-band-types": {
            "flags": "ofpmbt-drop"
          },
          "band-rate": 256, 
          "band-burst-size": 10
        }
      ]
    },
    "node": "/opendaylight-inventory:nodes/node[id='openflow:1']"
  }
}

Error:

{
  "errors": {
    "error": [
      {
        "error-tag": "operation-failed",
        "error-info": "Device-side failure",
        "error-message": "Device reported error type METERMODFAILED code OUTOFBANDS",
        "error-type": "application"
      }
    ]
  }

I already tried to write the node differently:

/opendaylight-inventory:nodes/node/openflow:1

But then I get a 400 with:

{
  "errors": {
    "error": [
      {
        "error-tag": "malformed-message",
        "error-info": "Could not parse Instance Identifier '/opendaylight-inventory:nodes/node/openflow:1'. Offset: 34 : Reason: Entry (urn:opendaylight:inventory?revision=2013-08-19)node requires key or value predicate to be present",
        "error-message": "Error parsing input: Could not parse Instance Identifier '/opendaylight-inventory:nodes/node/openflow:1'. Offset: 34 : Reason: Entry (urn:opendaylight:inventory?revision=2013-08-19)node requires key or value predicate to be present",
        "error-type": "protocol"
      }
    ]
  }
}

The node:

/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:1']

also generates the same error code 500.

0

There are 0 best solutions below