let RyuApp provide its own logger.
use it instead of per-module logger where appropriate.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This is purely internal change and no API for applications is
changed. At least, I confirmed that folsom OpenStack plugin works.
With the current dispatcher mechanism, multiple greenlets call
applications' handlers and might be blocked anywhere so we need
various locks to handle that concurrency. This makes things difficult
for application developers.
With this patch, each applications are connected with events. Each
application has the own greenlet(s) to handle events and might send
events to other applications.
If an application registers handlers for some OF events, it subscribes
to OF component and registers the OF events that it's interested. OF
application delivers such OF events to the application and the
application's greenlet executes the handlers.
With this, we can completely remove dispatcher.py and its friends.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
When switch sends version higher than Ryu supports, Ryu fails to negotiate.
In this case
4 = OF1.3 from switch
3 = OF1.2 from Ryu
datapath.supported_ofp_version = (3 = OF1.2,)
In such cases, we should use OF1.2 instead of error.
> Connection to controller closed because of {"localhost",6633,0, {unsupported_version,4}}
Reported-by: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
hacky workaround, will be removed. OF1.3 doesn't have ports. An
application should not depend on them. But there might be such bad
applications so let's keep this workaround for while.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
No reason that we use register_cls() for ofp handlers. We can do with
register_instance() with the others do.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>