mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
537 stars 344 forks source link

pyang versus pyang --ietf: error discrepancy #181

Closed bclaise closed 8 years ago

bclaise commented 8 years ago

I thought that the "pyang --ietf" was a superset of pyang. However, two of the LMAP YANG data models below produce an error for pyang, but not for pyang --ietf. What is even weirder is that the same error type shows for the third one (ietf-lmap-common@2015-10-28.yang ) for both pyang and pyang --ietf

bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ ls draft-ietf-lmap-yang-02.txt draft-ietf-lmap-yang-02.txt bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ xym.py draft-ietf-lmap-yang-02.txt Created the following models:: ietf-lmap-common@2015-10-28.yang ietf-lmap-control@2015-10-28.yang ietf-lmap-report@2015-10-28.yang

bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ pyang ietf-lmap-common@2015-10-28.yang ietf-lmap-common@2015-10-28.yang:4: warning: imported module ietf-yang-types not used bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ pyang --ietf ietf-lmap-common@2015-10-28.yang ietf-lmap-common@2015-10-28.yang:4: warning: imported module ietf-yang-types not used bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ pyang ietf-lmap-control@2015-10-28.yang ietf-lmap-common@2015-10-28.yang:4: warning: imported module ietf-yang-types not used bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ pyang --ietf ietf-lmap-control@2015-10-28.yang bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ pyang ietf-lmap-report@2015-10-28.yang ietf-lmap-common@2015-10-28.yang:4: warning: imported module ietf-yang-types not used bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$ pyang --ietf ietf-lmap-report@2015-10-28.yang bclaise@bclaise-VirtualBox:~/ietf/my-id-mirror$

mbj4668 commented 8 years ago

it is the normal pyang (w/o --ietf) that complains about the imported module. --ietf only reports problems with the module itself.