Re: [nox-dev] how to use discovery component?

2011-10-10 Thread Kyriakos Zarifis
Hi there, in order use Link_events in your python component you need to: 1) make your component aware of the Link_event object by importing it 2) register a handler for the event in your component's configure() (to make your component respond to such events) 3) write a handler (to tell your compo

Re: [nox-dev] how to use discovery component?

2011-10-10 Thread hzy
Hi murphy: yes, the results are the same. the NOX I am using is download from http://www.openflow.org/wk/index.php/OpenFlow_Tutorial. Never mind, the thing I concern is that how can i deal with the link_event in my component. I think I should look some codes, like core.py or something else, I jus

Re: [nox-dev] how to use discovery component?

2011-10-10 Thread Murphy McCauley
I don't know anything about pytutorial (it's not one of the mainlin NOX components), so I don't really know what to make of that. You tried implementing getInterface() like below on your my_router class? def getInterface (self): return str(my_router) And the results were the same? This is unr

Re: [nox-dev] how to use discovery component?

2011-10-10 Thread hzy
Hi murphy: Thank you for your reply, but I have added these codes in my component. This time I tried to invoke component pytutorial, so that you can get more information in your computer. So I add following codes in discovery component. self._pytutorial = self.resolve("nox.coreapps.tutorial.pytut

Re: [nox-dev] how to use discovery component?

2011-10-10 Thread Murphy McCauley
Whoops. I meant: def getInterface (self): return str(my_router) Sorry about that! -- Murphy On Oct 10, 2011, at 7:51 AM, Murphy McCauley wrote: > So first off, maybe you have a reason, but in general, the hope is that you > should have no reason to modify discovery.py. Rather than modify

Re: [nox-dev] how to use discovery component?

2011-10-10 Thread Murphy McCauley
So first off, maybe you have a reason, but in general, the hope is that you should have no reason to modify discovery.py. Rather than modify discovery.py to explicitly call your component, hopefully you should be able to simply handle discovery's Link_event. If you really do need to modify dis

Re: [nox-dev] how to use discovery component?

2011-10-10 Thread hzy
addition imformation: meta.xml http://www.noxrepo.org/components.xsd";> my_router python discovery nox.coreapps.my_experiment.my_router Makefile.am include ../../../Make.vars EXTRA_DIST =\ meta.xml \ __init__.py \ my_router

Re: [nox-dev] how to use discovery component?

2011-10-10 Thread hzy
hi murpy: Thank you for your reply. it works now, but another problem comes up. This time I want the discovery component invoke the dic_all_path defined in my modle. So I add following codes in discovery component self._my_router = self.resolve("nox.coreapps.my_experiment.my_router.my_router") pri