Yes, you need to register for the events .... check out pyswitch as an example of how to do this.

Hi Martin

I saw PyAuth has the below code on configure() - it looks like it already register for Host_join_event and Host_bind_event

I put some printing at Host_join_event / Host_bind_event class __init___ - but didnot see any printing when traffic runs

however, I did see output of nox_core command prints out that it authorize the node that has traffic

So, Do I need to call register function and implement my own handler ? can you give example of this method?

Thanks

Thuymai



class PyAuth(Component):
    def __init__(self, ctxt):
        Component.__init__(self, ctxt)
        self.authenticator = PyAuthenticator(ctxt)

    def configure(self, configuration):
self.authenticator.configure(configuration)
        Host_auth_event.register_event_converter(self.ctxt)
        Host_bind_event.register_event_converter(self.ctxt)
        Host_join_event.register_event_converter(self.ctxt)
        User_auth_event.register_event_converter(self.ctxt)
        User_join_event.register_event_converter(self.ctxt)
        Switch_bind_event.register_event_converter(self.ctxt)


------------------------------------------------------------------------
*From:* Martin Casado <[email protected]>
*To:* Chonduy Nguyen <[email protected]>
*Cc:* [email protected]; [email protected]
*Sent:* Tue, January 26, 2010 3:34:37 PM
*Subject:* Re: [nox-dev] directoryws not on version 0.6

Alternatively, you can listen for host_bind_event which is thrown for each new host detected. It contains the dpid, port, and addresses associated with each detected host.

> Hi Martin,
>
> I saw the method get_authed_addresses(*args) require hostid - where I expect the module discovered link connection
> between host and switch as we don't know what hostid or switch outthere.
> is there anyway I can get the list of hosts in authenticator without knowning or passing any info?
>
> Thanks
>
> ThuymaiNguyen
>
> ------------------------------------------------------------------------
> *From:* Martin Casado <[email protected] <mailto:[email protected]>>
> *To:* Chonduy Nguyen <[email protected] <mailto:[email protected]>>
> *Cc:* [email protected] <mailto:[email protected]>; [email protected] <mailto:[email protected]>
> *Sent:* Tue, January 26, 2010 1:33:08 PM
> *Subject:* Re: [nox-dev] directoryws not on version 0.6
>
> It requires traffic in order to reconstruct host-level information.
>
> > Hi Martin,
> >
> > Thanks for your info, So, I can just run nox_core component pyauthenticator so this component will discover nodes which are connecting to the switch > > "Without any traffic generated from that host to switch " ? or I need to run traffic ( example: having host1 ping host2)
> >
> > Thanks
> >
> > Thuymai
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------ > > *From:* Martin Casado <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> > > *To:* Chonduy Nguyen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> > > *Cc:* [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>
> > *Sent:* Tue, January 26, 2010 12:47:57 PM
> > *Subject:* Re: [nox-dev] directoryws not on version 0.6
> >
> > There are no webservices which directly expose authenticator. To do that, you're going to have to resolve PyAuth() and then call the accessor methods directly (e.g. get_authed_addresses(..) ).
> >
> > As an example of how to create a webservice, see src/nox/webapps/miscws/cpustats.py
> >
> > >
> > > Hi Martin
> > >
> > > I upgraded nox to be 0.6 - but observed that the directorymanagerws.py and its directory folder is not
> > > available on this version - This one is the one using authenticator
> > >
> > > Do you have any idea?
> > >
> > > I would like to see full topology of switch connects to host - etc...
> > >
> > > Can you please give any more details advice ?
> > >
> > > Thank you,
> > >
> > > TNguyen
> > >
> > >
> > > ------------------------------------------------------------------------ > > > *From:* Martin Casado <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> > > > *To:* Chonduy Nguyen <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> > > > *Cc:* [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>
> > > *Sent:* Mon, January 25, 2010 10:45:11 PM
> > > *Subject:* Re: [nox-dev] nox core discovery
> > >
> > > Discovery only shows links between switches, not between switches and hosts. For that, you'll have to explore authenticator.
> > >
> > > > Hi
> > > >
> > > > I am new with this module -
> > > > I have switch setup and connected with flowvisor - and nox_core ran with discoveryws and discovery module.
> > > > The switch also connected to 2 other physical machines
> > > >
> > > > However, when I ran webservice to look at the discovery object - I saw it only show
> > > >
> > > > Ethernet packet of the switch - where the dst value is the value on the file ethernet.py (NDP_MULTICAST)
> > > >
> > > > I am wondering what can I do to get nox discovery to show a topology connection between switch and the other 2 client machines?
> > > >
> > > > Below are the print out of the discovery object of LLDP packets
> > > >
> > > > PORT 0: EthernetPackageDESC: [5a:8c:29:22:d3:a9>01:23:20:00:00:01:LLDP]<chassis ID:5a:8c:29:22:d3:a9><port ID:00:00><ttl:120><tlv end> > > > > PORT : 1 EthernetPackageDESC: [5a:8c:29:22:d3:a9>01:23:20:00:00:01:LLDP]<chassis ID:5a:8c:29:22:d3:a9><port ID:00:01><ttl:120><tlv end>
> > > > ~                        > Thanks
> > > >
> > > > Nguyen > ------------------------------------------------------------------------
> > > >
> > > > _______________________________________________
> > > > nox-dev mailing list
> > > > [email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>>
> > > > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
> > > >
> > >
> >
> >
>
>




_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to