NSO-developer / pioneer

Your Swiss army knife for NETCONF, YANG and NSO NEDs
33 stars 13 forks source link

support for NSO4.5.1 #1

Open mano2soft opened 6 years ago

mano2soft commented 6 years ago

Hi NSO-developers,

Does the support for NSO4.5 also support 4.5.1, I get the below error when i make. I am using nso-4.5.1.linux.x86_64.signed.bin.

(nso) [root@bit-etv-serv1 src]# make PYTHONPATH=../python:$PYTHONPATH python ../python/pioneer/action.py Traceback (most recent call last): File "../python/pioneer/action.py", line 30, in import pioneer.namespaces.pioneer_ns as ns File "/root/nso/run/packages/pioneer/python/pioneer/init.py", line 3, in from action import Action File "/root/nso/run/packages/pioneer/python/pioneer/action.py", line 39, in import op.config_op File "/root/nso/run/packages/pioneer/python/pioneer/op/config_op.py", line 15, in import netconf_op ModuleNotFoundError: No module named 'netconf_op' make: *** [py] Error 1

Thanks, Manoj

sstrollo commented 6 years ago

Weird, works for me (netconf_op is part of pioneer, seems it can't be found?). What does the following three commands say:

ncs --version

python --version

ls ../python/pioneer/op

/Sebastian

mano2soft commented 6 years ago

Hi Sebastian,

Please find the details (nso) [root@bit src]# ncs --version 4.5.1 (nso) [root@bit src]# python --version Python 3.6.3 (nso) [root@bit src]# ls ../python/pioneer/op init.py pycache base_op.py config_op.py ex.py log_op.py netconf_op.py netconf_trace.py yang_op.py (nso) [root@bit src]# +++++++++++++++++++++ I also found StringIO and cStringIO modules are deprecated due to this netconf_op is missing, it will fail netconf_trace also. Reference:https://stackoverflow.com/questions/28200366/python-3-4-0-email-package-install-importerror-no-module-named-cstringio

import netconf_op Traceback (most recent call last): File "", line 1, in File "/root/nso/run/packages/pioneer/python/pioneer/op/netconf_op.py", line 9, in from cStringIO import StringIO ModuleNotFoundError: No module named 'cStringIO'

Thanks, Manoj

mano2soft commented 6 years ago

NSO-4.4.4 worked with python2.7. Need enhancement for python3.0 onwards

sstrollo commented 6 years ago

Thanks Manoj,

Yes, it does seem like a Python 3 issue (it worked for me, but with Python 2.7), I don't know if @janlindblad has tested with that, I'll have to defer to him, as I don't know the details of this package.

/Sebstian

novakmi commented 5 years ago

Initial porting to Python3 was done, see PR: https://github.com/NSO-developer/pioneer/pull/6