Re: [nox-dev] a code problem about “util.py”

2011-11-02 Thread hzy
what the ctxt mean? 2011/11/3 hzy > the code problem I have solved after I looked the python books about > function. > > but, when I look the codes in the core.py. > def register_handler(self, event_name, handler): > """\brief Register an event handler. > > The handler will be ca

Re: [nox-dev] a code problem about “util.py”

2011-11-02 Thread hzy
the code problem I have solved after I looked the python books about function. but, when I look the codes in the core.py. def register_handler(self, event_name, handler): """\brief Register an event handler. The handler will be called with: handler(event). 'event' is a dic

[nox-dev] what is the difference between pyswitch and routing module?

2011-11-02 Thread Shan Hu
I'm wondering what's the different between routing module and pyswitch module? I can find from wiki that routing is basically a forwarding module. but what about pyswitch? Because after i connected 3 openvswitchs(like this:host1 -- ovs1 -- ovs2 -- ovs3 --host2),i firstly ran pyswitch module,the

Re: [nox-dev] a code problem about “util.py”

2011-11-02 Thread hzy
The reason why I need to look at the code is that I want to know how does NOX handle the Datapath_join_event. I know the gen_datapath_join_callback was invoked by function register_for_datapath_join in core.py. I am very interested in the architecture of NOX. I am eager to know how the NOX works.

[nox-dev] a code problem about “util.py”

2011-11-02 Thread hzy
Hi all: when I look at the code in nox/src/nox/lib/util.py written in python. I was confused about some codes there. Because I am newbie to python. def gen_datapath_join_callback(handler): > def f(event): > attrs = {} > attrs[core.N_BUFFERS] = event.n_buffers > attrs[co