OpenROADM / OpenROADM_MSA_Public

Open ROADM MSA
http://www.openroadm.org/
62 stars 79 forks source link

pyang 1.7.3 --lint should pass on all models #20

Open fnchooft opened 7 years ago

fnchooft commented 7 years ago

Good Evening OpenRoadm, Could you please make sure that the new models version 2.0.1 pass at least with the pyang-lint option? Try this simple check:

$ git clone https://github.com/mbj4668/pyang
$ . ./env.sh 
$ pyang -v
$ pyang 1.7.3

Example:

$ pyang --lint org-openroadm-common-types.yang 
org-openroadm-common-types.yang:38: error: RFC 6087: 4.7: statement "revision" must have a "reference" substatement
org-openroadm-common-types.yang:42: error: RFC 6087: 4.7: statement "revision" must have a "reference" substatement
org-openroadm-common-types.yang:47: error: RFC 6087: 4.12: statement "grouping" must have a "description" substatement
org-openroadm-common-types.yang:48: error: RFC 6087: 4.12: statement "leaf" must have a "description" substatement
org-openroadm-common-types.yang:50: warning: RFC 6087: 4.3: statement "mandatory" is given with its default value "false"
org-openroadm-common-types.yang:52: error: RFC 6087: 4.12: statement "leaf" must have a "description" substatement
org-openroadm-common-types.yang:54: warning: RFC 6087: 4.3: statement "mandatory" is given with its default value "false"
org-openroadm-common-types.yang:56: error: RFC 6087: 4.12: statement "leaf" must have a "description" substatement
org-openroadm-common-types.yang:58: warning: RFC 6087: 4.3: statement "mandatory" is given with its default value "false"
org-openroadm-common-types.yang:60: error: RFC 6087: 4.12: statement "leaf" must have a "description" substatement
org-openroadm-common-types.yang:62: warning: RFC 6087: 4.3: statement "mandatory" is given with its default value "false"
org-openroadm-common-types.yang:68: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:71: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:74: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:77: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:91: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:94: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:106: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:107: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:110: error: keyword "units" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:115: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:116: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:119: error: keyword "units" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:124: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:125: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:128: error: keyword "units" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:133: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:134: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:137: error: keyword "units" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:142: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:143: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:146: error: keyword "units" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:151: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:165: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:166: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:184: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:185: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:209: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:210: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:243: error: circular dependency for type "rpc-status"
org-openroadm-common-types.yang:245: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:246: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:256: error: RFC 6087: 4.12: statement "grouping" must have a "description" substatement
org-openroadm-common-types.yang:270: error: circular dependency for type "extended-rpc-status"
org-openroadm-common-types.yang:272: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:273: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:286: error: RFC 6087: 4.12: statement "grouping" must have a "description" substatement
org-openroadm-common-types.yang:302: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:303: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:333: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:334: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:347: error: RFC 6087: 4.11,4.12: statement "typedef" must have a "description" substatement
org-openroadm-common-types.yang:349: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:352: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:358: error: RFC 6087: 4.12: statement "grouping" must have a "description" substatement
org-openroadm-common-types.yang:359: error: RFC 6087: 4.12: statement "leaf" must have a "description" substatement
org-openroadm-common-types.yang:362: error: keyword "config" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:366: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:367: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:368: error: keyword "mandatory" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:369: error: keyword "config" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:373: error: RFC 6087: 4.11,4.12: statement "typedef" must have a "description" substatement
org-openroadm-common-types.yang:375: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:378: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:381: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:384: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:387: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:390: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:393: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:401: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:402: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:416: error: RFC 6087: 4.11,4.12: statement "typedef" must have a "description" substatement
org-openroadm-common-types.yang:418: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:421: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:424: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:427: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:433: error: RFC 6087: 4.11,4.12: statement "typedef" must have a "description" substatement
org-openroadm-common-types.yang:435: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:438: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:441: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:450: error: keyword "description" not in canonical order,expected "type", (See RFC 6020, Section 12)
org-openroadm-common-types.yang:451: error: keyword "type" not in canonical order, (See RFC 6020, Section 12)
org-openroadm-common-types.yang:465: error: RFC 6087: 4.11,4.12: statement "typedef" must have a "description" substatement
org-openroadm-common-types.yang:467: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:470: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:473: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:476: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:479: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:482: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:485: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:488: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement
org-openroadm-common-types.yang:491: warning: RFC 6087: 4.10,4.12: statement "enum" should have a "description" substatement

Kind regards.

bclaise commented 7 years ago

Indeed, and there are some more extra errors/warnings from yanglint, confd, yangdump-pro. See http://www.claise.be/OpenROADM20YANGPageCompilation.html

fnchooft commented 7 years ago

@bclaise : My apologies for not adding your site. Actually your site was the one that triggered this issue. Eventhough some warnings and errors are not critical ( loading and or generating code for them) - it would be good to see them fixed.