[CONTROLLER-148] Controller should not allow to create flow with different flowID in URI and xml body Created: 06/Feb/14  Updated: 25/Jul/23  Due: 07/Mar/14  Resolved: 28/Feb/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Md Faizan Assignee: Vaclav Demcak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 404
Priority: High

 Description   

I created a flow with different flowID in URI and xml body as stated below:

PUT : http://192.168.56.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/24

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>2</priority>
<flow-name>Foo</flow-name>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<ipv4-destination>10.0.10.2/24</ipv4-destination>
</match>
<id>25</id>
<table_id>1</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

The flow gets created and RESPONSE is 200 ok.

When I hit the below URI it fails to generate the xml.
GET : http://192.168.56.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/24

On the other hand when I hit the below URI, response is 404 Not Found
GET : http://192.168.56.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/25

The controller should not allow to create a flow with diffrent flowId in URI and xml body at the first place itself.

Thanks
Faizan



 Comments   
Comment by Tony Tkacik [ 07/Feb/14 ]

Moved to MD-SAL, as the data semantic validation should be there, and this also affects java additions.

Comment by Tony Tkacik [ 18/Feb/14 ]

SchemaAwareDataStoreAdapter should verify this.

Comment by Vaclav Demcak [ 28/Feb/14 ]

Fixed in https://git.opendaylight.org/gerrit/#/c/5504/

Generated at Wed Feb 07 19:52:18 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.