mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 20:36:10 +02:00
app_manager: add some assertions and LOG.info
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
d7163b5463
commit
4b8a4fc870
@ -35,6 +35,8 @@ def lookup_service_brick(name):
|
||||
|
||||
|
||||
def register_app(app):
|
||||
assert isinstance(app, RyuApp)
|
||||
assert not app.name in SERVICE_BRICKS
|
||||
SERVICE_BRICKS[app.name] = app
|
||||
register_instance(app)
|
||||
|
||||
@ -146,6 +148,8 @@ class AppManager(object):
|
||||
def create_contexts(self):
|
||||
for key, cls in self.contexts_cls.items():
|
||||
context = cls()
|
||||
LOG.info('creating context %s', key)
|
||||
assert not key in self.contexts
|
||||
self.contexts[key] = context
|
||||
# hack for dpset
|
||||
if context.__class__.__base__ == RyuApp:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user