CiscoDevNet / yang-explorer

An open-source Yang Browser and RPC Builder Application
Apache License 2.0
438 stars 177 forks source link

to upload juniper yang failed #47

Closed vincenzheng closed 7 years ago

vincenzheng commented 7 years ago

hello, I tried to use this to upload juniper yang as well, but it failed:

python manage.py bulkupload --user admin --git https://github.com/Juniper/yang.git --dir 14.2

So it's only for Cisco YANG?

Git upload .. Cloning into '/vagrant/yang-explorer-master/server/data/session/tmpasKAaI'... remote: Counting objects: 19, done. remote: Total 19 (delta 0), reused 0 (delta 0), pack-reused 19 Unpacking objects: 100% (19/19), done. Checking connectivity... done. Cleaning up /vagrant/yang-explorer-master/server/data/session/tmpasKAaI Compiling : user: admin, file: /vagrant/yang-explorer-master/server/data/session/tmpDK7KBB/configuration.yang DEBUG:root:Compiling session dependency ... /usr/local/bin/pyang DEBUG:root:Rebuilding dependencies for user admin ['pyang', '-f', 'pyimport', '--plugindir', 'explorer/plugins', '-p', 'data/users/admin/yang:data/session/tmpDK7KBB', 'data/session/tmpDK7KBB/configuration.yang'] DEBUG:root:invoke_compile: CMD: ['pyang', '-f', 'pyimport', '--plugindir', 'explorer/plugins', '-p', 'data/users/admin/yang:data/session/tmpDK7KBB', 'data/session/tmpDK7KBB/configuration.yang'] ERROR:root:invoke_compile: Compile Errors: [] Compilation Failed: Cleaning up /vagrant/yang-explorer-master/server/data/session/tmpDK7KBB vagrant@vagrant-ubuntu-trusty-64:/vagrant/yang-explorer-master/server$

pgohite commented 7 years ago

It should work with any standard yang model. As your model is big, It might need extra memory during compilation. Try increasing memory for you vm.

vincenzheng commented 7 years ago

not good. I tried with memory more than 8G. still not working.

pgohite commented 7 years ago

I am able to run your command and load model successfully. Could be an issue with your environment. You can try to compile model in your sandbox manually and see if it works.

vincenzheng commented 7 years ago

Thank you for your quick response. pgohite. Would you explain how to compile model manually?

I tried with following command manually and it looks there's 'Segmentation fault' raised.

(v)vagrant@vagrant-ubuntu-trusty-64:~/yang-explorer/server$ pyang -f pyimport --plugindir explorer/plugins -p data/users/admin/yang:/home/vagrant /home/vagrant/configuration.yang Segmentation fault (core dumped)

vincenzheng commented 7 years ago

solved it after reinstallation. thanks

pgohite commented 7 years ago

Thanks