marvin-zhao / pyang

Automatically exported from code.google.com/p/pyang
0 stars 0 forks source link

Extensions ignored in YIN format #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If a module in *YIN format* is loaded via Context::search_module, then all YANG 
extensions appearing in it are ignored. It is demonstrated in the attached 
example:

1. Go to the "yang" directory first, everything works:

$ pyang test.yang
$ pyang -L hello.xml

2. In the "yin" directory, the first way also works but the other fails:

$ pyang test.yin  
$ pyang -L hello.xml
test.yin:7: warning: imported module ietf-yang-metadata not used
test.yin:10: error: no module with the namespace 
"urn:ietf:params:xml:ns:yang:ietf-yang-metadata" is imported

It is due to the fact the YinParser in Context::_ensure_revs is
initialised with the "extra" parameter containing 'no_extensions':True
For YangParser, no such parameter is present.

Original issue reported on code.google.com by lada.lho...@gmail.com on 27 Feb 2015 at 2:29

Attachments: