Hi, (2014/04/22 11:29), Karthik Sharma wrote: > This is the code for class Switches from > https://github.com/osrg/ryu/blob/master/ryu/topology/switches.py#L429 > > The member variables of particular interest to me in the class Switches are > the following. > > self.dps = {} # datapath_id => Datapath class > self.port_state = {} # datapath_id => ports > self.ports = PortDataState() # Port class -> PortData class > self.links = LinkState() # Link class -> timestamp > self.is_active = True > > These are the member variables that the RYU uses to cache the topology > details.I am trying to figure out how a topology can be represented using > the following variables. > > 1) dps is a dictionary which maps datapath_id to datapath class? > > - Can someone explain to me what is a datapath_id and a > datapath class? > dps has instance objects of ryu.controller.controller.Datapath https://github.com/osrg/ryu/blob/master/ryu/controller/controller.py#L100
> 2) port_state is a dictionary which maps datapath id to ports > > - As per my understanding on a switch without a VLAN all > the ports will belong to the same datapath id?In case of a switch with > VLAN ports on the switch can have multiple datapath id's. Is my > understanding correct? > Basically yes. To be exact, It's not VLAN that separates a physical switch into multiple datapath. I don't know what I call it. Something like VRF? > 3) ports is again a dictionary which maps Port class to PortData class? > > - what does this mean? > A Port has a PortData. Maybe PortData should be member variable of Port. > 4) links is again a dictionary which maps Link class to timestamp > > - again what does this mean? > Same as 3). > I am trying to get my head around how RYU controller stores the topology > information using the above structures.Any help in understanding or > explanation would be greatly appreciated. > > Thanks & Regards, > Karthik. > > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > > > > _______________________________________________ > Ryu-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
