[OPNFLWJAVA-8] Module openflow-augments.yang fails pyang validation Created: 12/Dec/13  Updated: 17/Feb/14  Resolved: 17/Feb/14

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

Type: Bug
Reporter: Jan Medved Assignee: Jan Medved
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: Macintosh


External issue ID: 239

 Description   
  • Line 251, error:
    ' the list at "pyang-wd/openflow-augments.yang:251 (at pyang-wd/openflow-extensible-match.yang:216)" needs at least one key because it is used as config'
  • Line 294, error:
    ' the list at "pyang-wd/openflow-augments.yang:294 (at pyang-wd/openflow-instruction.yang:46)" needs at least one key because it is used as config'
  • Line 298, error:
    ' the list needs at least one key'
  • Line 306, error:
    ' the list at "pyang-wd/openflow-augments.yang:306 (at pyang-wd/openflow-action.yang:86)" needs at least one key because it is used as config'
  • Line 310, error:
    ' the list at "pyang-wd/openflow-augments.yang:310 (at pyang-wd/openflow-extensible-match.yang:216)" needs at least one key because it is used as config'
  • Line 343, error:
    ' the list at "pyang-wd/openflow-augments.yang:343 (at pyang-wd/openflow-action.yang:86)" needs at least one key because it is used as config'


 Comments   
Comment by sunny malhotra [ 27/Jan/14 ]

I am trying to reproduce the bug.Though the pyang validation fails , but
the output I am getting is different from the one specified in the comments .

Console output :
openflow-action.yang:81 (at openflow-action.yang:86): error: the key "action" does not reference an existing leaf

Comment by Sahil Shah [ 12/Feb/14 ]

I think as a fix for this the commiter has added a key(key “action”.
But this leads to another error while validating openflow-augments.yang using pyang.
Error message thrown at console is :
openflow-action.yang:81 (at openflow-action.yang:86): error: the key "action" does not reference an existing leaf

I tried look into the issue and as per my observation , the error occurs because the key “action” refers to container action instead of leaf which is against pyang validation rules.

I would suggest that instead of using key “action” , we can explicitly mention config as false.

After this change , the pyang validation doesn't show any errors.

Please review the code and update.

Gerrit Link : https://git.opendaylight.org/gerrit/#/c/5283/

Comment by Michal Polkorab [ 12/Feb/14 ]

Hello,

I will take care of this.

Michal

Comment by Michal Polkorab [ 17/Feb/14 ]

Hello,

issue fixed with https://git.opendaylight.org/gerrit/#/c/5283/

Regards
Michal

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