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]

The flow content is wrong. If you try to install the flow :

<flow xmlns="urn:opendaylight:flow:inventory"> 
    <priority>2</priority> 
     <flow-name>TestFlow1</flow-name> 
  <match> 
    <ethernet-match> 
      <ethernet-type> 
        <type>2048</type> 
      </ethernet-type> 
    </ethernet-match> 
    <ipv4-destination>10.0.0.2/24</ipv4-destination> 
  </match> 
  <id>1</id> 
  <table_id>0</table_id> 
  <instructions> 
    <instruction> 
      <order>0</order> 
      <apply-actions> 
        <action> 
          <order>0</order> 
          <dec-nw-ttl> </dec-nw-ttl>    # problem is here 
        </action> 
      </apply-actions> 
    </instruction> 
  </instructions> 
</flow>

Error Response :

{
    "errors": {
        "error": [
            {
                "error-type": "protocol",
                "error-tag": "invalid-value",
                "error-message": "Unhandled parameter types: [container dec-nw-ttl]"
            }
        ]
    }
}

The correct way of sending the flow using postman is :

url : http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:108777412405314/table/0/flow/1

Headers: Content-Type: Application/xml

Body:

<flow xmlns="urn:opendaylight:flow:inventory"> 
    <priority>2</priority> 
     <flow-name>TestFlow1</flow-name> 
  <match> 
    <ethernet-match> 
      <ethernet-type> 
        <type>2048</type> 
      </ethernet-type> 
    </ethernet-match> 
    <ipv4-destination>10.0.0.2/24</ipv4-destination> 
  </match> 
  <id>1</id> 
  <table_id>0</table_id> 
  <instructions> 
    <instruction> 
      <order>0</order> 
      <apply-actions> 
        <action> 
          <order>0</order> 
          <dec-nw-ttl> 
          </dec-nw-ttl>
        </action> 
      </apply-actions> 
    </instruction> 
  </instructions> 
</flow>

send it and you will get the response code 200 !!

The flow content is wrong. If you try to install the flow :

<flow xmlns="urn:opendaylight:flow:inventory"> 
    <priority>2</priority> 
     <flow-name>TestFlow1</flow-name> 
  <match> 
    <ethernet-match> 
      <ethernet-type> 
        <type>2048</type> 
      </ethernet-type> 
    </ethernet-match> 
    <ipv4-destination>10.0.0.2/24</ipv4-destination> 
  </match> 
  <id>1</id> 
  <table_id>0</table_id> 
  <instructions> 
    <instruction> 
      <order>0</order> 
      <apply-actions> 
        <action> 
          <order>0</order> 
          <dec-nw-ttl> </dec-nw-ttl>    # problem is here 
        </action> 
      </apply-actions> 
    </instruction> 
  </instructions> 
</flow>

Error Response :

{
    "errors": {
        "error": [
            {
                "error-type": "protocol",
                "error-tag": "invalid-value",
                "error-message": "Unhandled parameter types: [container dec-nw-ttl]"
            }
        ]
    }
}

The correct way of sending the flow using postman is :

url : http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:108777412405314/table/0/flow/1

Headers: Content-Type: Application/xml

Body:

<flow xmlns="urn:opendaylight:flow:inventory"> 
    <priority>2</priority> 
     <flow-name>TestFlow1</flow-name> 
  <match> 
    <ethernet-match> 
      <ethernet-type> 
        <type>2048</type> 
      </ethernet-type> 
    </ethernet-match> 
    <ipv4-destination>10.0.0.2/24</ipv4-destination> 
  </match> 
  <id>1</id> 
  <table_id>0</table_id> 
  <instructions> 
    <instruction> 
      <order>0</order> 
      <apply-actions> 
        <action> 
          <order>0</order> 
          <dec-nw-ttl> 
          </dec-nw-ttl>
<dec-nw-ttl/>
        </action> 
      </apply-actions> 
    </instruction> 
  </instructions> 
</flow>

send it and you will get the response code 200 !!