[OPNFLWPLUG-271] Remove table_id in flow from config namespace Created: 11/Sep/14  Updated: 27/Sep/21  Resolved: 12/Dec/17

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Jan Hajnar Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: PNG File inventory_nodes.png    
Issue Links:
Blocks
is blocked by CONTROLLER-475 Non-configuration items in the model ... Resolved

 Description   

table_id in Flow should not be visible in config namespace. It then enables users to create incorrect Flow configuration which has different table_id specified in payload than one specified in path e.g.

path:
.../config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1234

data:
<flow xmlns="urn:opendaylight:flow:inventory">
<id>1234</id>
...
<priority>2</priority>
<strict>false</strict>
<table_id>2</table_id>
</flow>



 Comments   
Comment by Bhavesh Kumar [ 03/Apr/15 ]

As per my investigation on this bug reported,
the "table_id" in the flow always comes as the table_id sent in the URL.

eg:

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

Output:

<flow>
<id>#UF$TABLE*0-1097</id>
<hard-timeout>0</hard-timeout>
<table_id>0</table_id>
<match>
<in-port>openflow:1:2</in-port>

Comment by Bhavesh Kumar [ 03/Apr/15 ]

Attachment inventory_nodes.png has been added with description: Reproduced data on inventory hit

Comment by Jan Hajnar [ 07/Apr/15 ]

Hi,

Issue is that table id should not be part of payload when creating new flow configuration. Information about table id is already contained within path. It could potentially cause problems when these two values differ.

Value of table_id is used when getting flow data from network device and it is operational data. This issue can be resolved by adding "config false" statement to table_id leaf in flow inventory yang module. Problem is that we currently do not check for config statement value when writing into data store. There is a bug (#1014) created for it and this bug depends on it. Once issue 1014 is resolved, this bug can also be fixed.

Jan.

Comment by Anil Vishnoi [ 25/Jun/15 ]

I believe with the current implementation we do verify that table_id in flow body is same as in URL, but need to confirm it.

Though i agree with Jan, that it's additional information, but we need to be careful on how we disable it, because it can break the existing app running on lithium release once they move to Be release. So we need to make sure that we device a solution in a way that we maintain the backward compatibility.

Comment by Michal Rehak [ 26/Jun/15 ]

We have 2 basic flow models - for Rpc and for dataStore (+ notifications, statistics..).

Required id fields for flow
===========================
[Rpc input]
node-ref
table.id

[DS - restconf POST]
flow.id

[DS - restconf PUT]

So in principle there is no need for table and node identifiers in flow object when writing to DS. Just flow.id is required.
And for Rpc flow.id is of no use but node and table identifiers are mandatory.

Comment by Anil Vishnoi [ 12/Dec/17 ]

No activity on this bug for a while, and now most of the projects are now using the existing model, so removing the table.id won't be backward compatible. If this is still required, please re-open the bug.

Generated at Wed Feb 07 20:32:01 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.