To begin with, let's look at two basic components of Ryu code that we have seen in the switch application:
- ryu.base.app_manager: The component that centrally manages Ryu applications. ryu.base.app_manager.RyuApp is the base class that all Ryu applications inherit. It provides contexts to Ryu applications and routes messages among Ryu applications (contexts are ordinary Python objects shared among Ryu applications). It also contains methods such as send_event or send_event_to_observers to raise OpenFlow events.
- ryu.controller: The ryu.controller.controller handles connections from switches and routes events to appropriate entities:
- ryu.controller.ofp_event: This is the OpenFlow event definition.
- ryu.controller.ofp_handler ...