mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
base/app_manager: context might be RyuApp
The class used for context might be RyuApp. So methods of RyuApp needs to be called. Reported-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
e45f382e51
commit
9837d8155f
@ -227,13 +227,14 @@ class AppManager(object):
|
||||
|
||||
def create_contexts(self):
|
||||
for key, cls in self.contexts_cls.items():
|
||||
context = cls()
|
||||
if issubclass(cls, RyuApp):
|
||||
# hack for dpset
|
||||
context = self._instantiate(None, cls)
|
||||
else:
|
||||
context = cls()
|
||||
LOG.info('creating context %s', key)
|
||||
assert not key in self.contexts
|
||||
self.contexts[key] = context
|
||||
# hack for dpset
|
||||
if issubclass(context.__class__, RyuApp):
|
||||
register_app(context)
|
||||
return self.contexts
|
||||
|
||||
def _update_bricks(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user