First off, make pyauthenticator a dependency of your component in your meta.json. Or at least run pyauthenticator on the commandline.
Then use the following import statement: from nox.netapps.authenticator import pyauth This will let you resolve the Python authenticator component like so: self.auth = self.resolve(pyauth.PyAuth) And you can register for events such as the Host_auth_event like this: self.register_handler(pyauth.Host_auth_event.static_get_name(), cb) Hope that helps. -- Murphy On Apr 7, 2011, at 5:46 AM, karim torkmen wrote: > Hi, > Is there any example that is using the authenticator component, I want to get > access to the Auth_event and the other functionalities of it. I am having > some troubles to install it. > In fact, I did the following: > from nox.netapps.authenticator.pyauth import pyauthenticator > from nox.netapps.authenticator.pyauth import authenticator (as a second > trial) > And i get always the error of "can not import python module etc." > Than I tried with > rom nox.netapps.authenticator.pyauth import * > > And the error now became at those levels: > > self.aut = self.resolve(authenticator) / self.aut = > self.resolve(pyauthenticator): the error i got is : "NameError: global name > 'authenticator'/pyauthenticator is not defined" > > and at this line of code > self.register_handler (self.Auth_event.static_get_name(),self.auth_call_back) > error " AttributeError: try_topology instance has no attribute 'Auth_event'" > > Thanks a lot for the help > Regards, > Karim > > > > _______________________________________________ > nox-dev mailing list > [email protected] > http://noxrepo.org/mailman/listinfo/nox-dev _______________________________________________ nox-dev mailing list [email protected] http://noxrepo.org/mailman/listinfo/nox-dev
