Re: [nox-dev] how to use Authentication component
I'm not sure. Maybe someone else in the list knows the right way to import it. On Sat, Jun 11, 2011 at 3:01 AM, 颜玮 yan...@bupt.edu.cn wrote: I am wirting a program to print the location of each host.And,i think *Authenticator* can help me with that. My plan is to call * get_authed_locations(self,dladdr,nwaddr)* in *pyauth.py*,i don't know wether this way can work or not,if i am wrong,please correct me. When i imported authenticator component to my file using“*from nox.netapps.authenticator import pyauth*”,something when wrong,the error info : 00041|nox|DBG:authtest: Current state: ERROR Required state: INSTALLED Dependencies: 'python' OK, 'python' OK Error: cannot import a Python module 'nox.coreapps.examples.authtest': Traceback (most recent call last): File ./nox/coreapps/examples/authtest.py, line 2, in module from nox.netapps.authenticator import pyauth File ./nox/netapps/authenticator/pyauth.py, line 25, in module _pyauth = swig_import_helper() File ./nox/netapps/authenticator/pyauth.py, line 21, in swig_import_helper _mod = imp.load_module('_pyauth', fp, pathname, description) ImportError: ./nox/netapps/authenticator/_pyauth.so: undefined symbol: vigil::Host_auth_event::Host_auth_event(vigil::datapathid, unsigned short, vigil::ethernetaddr, unsigned int, long long, long long, unsigned int, vigil::Host_event::Reason) 00042|nox|ERR:Cannot change the state of 'authtest' to INSTALLED: 'authtest' ran into an error: cannot import a Python module 'nox.coreapps.examples.authtest': Traceback (most recent call last): File ./nox/coreapps/examples/authtest.py, line 2, in module from nox.netapps.authenticator import pyauth File ./nox/netapps/authenticator/pyauth.py, line 25, in module _pyauth = swig_import_helper() File ./nox/netapps/authenticator/pyauth.py, line 21, in swig_import_helper _mod = imp.load_module('_pyauth', fp, pathname, description) ImportError: ./nox/netapps/authenticator/_pyauth.so: undefined symbol: vigil::Host_auth_event::Host_auth_event(vigil::datapathid, unsigned short, vigil::ethernetaddr, unsigned int, long long, long long, unsigned int, vigil::Host_event::Reason) Am i importing the component in the right way? can anybody help me with that? ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] how to use Authentication component
authenticator and pyauthenticator are components, so -- like all components -- NOX needs to know to load them and resolve their dependencies. The fix is easy: Add the pyauthenticator component as a dependency in your meta.json file (or simply specify pyauthenticator on the commandline *before* your component). pyauthenticator will then pull in a couple other dependencies (authenticator, for one!). Hopefully that'll do it. -- Murphy On Saturday, June 11, 2011 04:32:02 AM Srini Seetharaman wrote: I'm not sure. Maybe someone else in the list knows the right way to import it. On Sat, Jun 11, 2011 at 3:01 AM, 颜玮 yan...@bupt.edu.cn wrote: I am wirting a program to print the location of each host.And,i think *Authenticator* can help me with that. My plan is to call * get_authed_locations(self,dladdr,nwaddr)* in *pyauth.py*,i don't know wether this way can work or not,if i am wrong,please correct me. When i imported authenticator component to my file using“*from nox.netapps.authenticator import pyauth*”,something when wrong,the error info : 00041|nox|DBG:authtest: Current state: ERROR Required state: INSTALLED Dependencies: 'python' OK, 'python' OK Error: cannot import a Python module 'nox.coreapps.examples.authtest': Traceback (most recent call last): File ./nox/coreapps/examples/authtest.py, line 2, in module from nox.netapps.authenticator import pyauth File ./nox/netapps/authenticator/pyauth.py, line 25, in module _pyauth = swig_import_helper() File ./nox/netapps/authenticator/pyauth.py, line 21, in swig_import_helper _mod = imp.load_module('_pyauth', fp, pathname, description) ImportError: ./nox/netapps/authenticator/_pyauth.so: undefined symbol: vigil::Host_auth_event::Host_auth_event(vigil::datapathid, unsigned short, vigil::ethernetaddr, unsigned int, long long, long long, unsigned int, vigil::Host_event::Reason) 00042|nox|ERR:Cannot change the state of 'authtest' to INSTALLED: 'authtest' ran into an error: cannot import a Python module 'nox.coreapps.examples.authtest': Traceback (most recent call last): File ./nox/coreapps/examples/authtest.py, line 2, in module from nox.netapps.authenticator import pyauth File ./nox/netapps/authenticator/pyauth.py, line 25, in module _pyauth = swig_import_helper() File ./nox/netapps/authenticator/pyauth.py, line 21, in swig_import_helper _mod = imp.load_module('_pyauth', fp, pathname, description) ImportError: ./nox/netapps/authenticator/_pyauth.so: undefined symbol: vigil::Host_auth_event::Host_auth_event(vigil::datapathid, unsigned short, vigil::ethernetaddr, unsigned int, long long, long long, unsigned int, vigil::Host_event::Reason) Am i importing the component in the right way? can anybody help me with that? ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] how to use Authentication component
Hi all, I met difficulty in using /Authontication/ component,and i need your help. here is my problem: I want to know the location of each host,and i think there must be a function in Authentication component that i can ues,but i don't know which one. Any one knows? also,should i import the component in my codefile like /from nox.netapps.authenticator.pyauth import */ ? --- yan 6/10 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] how to use Authentication component
You may be able to listen for Host_event (with filter Host_event.action == Action.ADD), and track the datapath_id and port of each host. In the python side, I think it is Host_bind_event. 2011/6/10 颜玮 yan...@bupt.edu.cn: Hi all, I met difficulty in using Authontication component,and i need your help. here is my problem: I want to know the location of each host,and i think there must be a function in Authentication component that i can ues,but i don't know which one. Any one knows? also,should i import the component in my codefile like from nox.netapps.authenticator.pyauth import * ? --- yan 6/10 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev