(2014/06/11 16:56), YAMADA Hideki wrote: > (2014/06/11 16:32), FUJITA Tomonori wrote: >> On Thu, 5 Jun 2014 19:08:48 +0900 >> YAMADA Hideki <[email protected]> wrote: >> >>> >>> Signed-off-by: YAMADA Hideki <[email protected]> >>> --- >>> ryu/base/app_manager.py | 14 +++++++------- >>> 1 file changed, 7 insertions(+), 7 deletions(-) >>> >>> diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py >>> index 25b043a..59a8b4b 100644 >>> --- a/ryu/base/app_manager.py >>> +++ b/ryu/base/app_manager.py >>> @@ -68,14 +68,14 @@ def unregister_app(app): >>> def require_app(app_name): >>> """ >>> Request the application to be loaded. >>> - >>> - This is used for "api" style modules, which is imported by a client >>> - application, to automatically load the corresponding server >>> application. >>> """ >>> - frm = inspect.stack()[2] # skip a frame for "api" module >>> - m = inspect.getmodule(frm[0]) # client module >>> - m._REQUIRED_APP = getattr(m, '_REQUIRED_APP', []) >>> - m._REQUIRED_APP.append(app_name) >>> + for frame_record in inspect.stack(): >>> + frame = frame_record[0] >>> + module = inspect.getmodule(frame) >>> + module._REQUIRED_APP = getattr(module, '_REQUIRED_APP', []) >>> + for name, member in inspect.getmembers(module): >>> + if inspect.isclass(member) and issubclass(member, RyuApp): >>> + module._REQUIRED_APP.append(app_name) >> >> This breaks the current behavior? >> > ryu.topology.api and ryu.app.ofctl.api seem to work well. > I have not tested ryu.services.protocols.vrrp.api. > > I will rewrite this patch in a safe way.
------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
