-
Notifications
You must be signed in to change notification settings - Fork 7
SwitchRegistryModule
| ModuleTypeID (hex) | 0x0001 |
|---|---|
| ModuleTypeID (decimal) | 1 |
| Distribution support | single instance |
| Dependencies | - |
The SwitchRegistryModule knows about all switches in the SDN-network. This module provides more detailed information about switches and publishes events informing other modules about the state of the switches. In contrast, the SwitchAdapter only serves as a connector between ZMF and the OpenFlow connection to an actual switch.
Query all Switches known to the SwitchRegistryModule. Reply can contain 0 or more Switches.
| _.Request-MessageType | [[REQUEST.SWITCH_REGISTRY_MODULE.GET_ALL_SWITCHES |
| _.Request-Payload | [[Request-Container |
| _.Reply-MessageType | [[REPLY.SWITCH_REGISTRY_MODULE.GET_ALL_SWITCHES |
| _.Reply-Payload | [[Reply-Container |
Query for a single switch. Request must contain the switchId (datapath id) of the switch. Reply contains the switch with that switchId, or nothing, if the SwitchRegistryModule does not know any switch with that switchId.
| .Request-MessageType | [[REQUEST.SWITCH_REGISTRY_MODULE.GET_SWITCH_BY_ID |
| .Request-Payload | [[Request-Container |
| .Reply-MessageType | [[REPLY.SWITCH_REGISTRY_MODULE.GET_SWITCH_BY_ID |
| .Reply-Payload | [[Reply-Container |
When a switch is added, removed, or changed one of its attributes, an event of this type is published.
| _.From-MessageType | [[FROM.SWITCH_REGISTRY_MODULE.SWITCH_EVENT.*(ADDED/REMOVED/CHANGED) |
| _.From-Payload | [[From-Container |
FROM = 0x02
SWITCH_REGISTRY_MODULE = 0x0001
SWITCH_EVENT = 0x00
ADDED = 0x00
REMOVED = 0x01
CHANGED = 0x02
REQUEST = 0x03
SWITCH_REGISTRY_MODULE = 0x0001
GET_ALL_SWITCHES = 0x00
GET_SWITCH_BY_ID = 0x01
REPLY = 0x04
SWITCH_REGISTRY_MODULE = 0x0001
GET_ALL_SWITCHES = 0x00
GET_SWITCH_BY_ID = 0x01
start Module:
- do the Subscriptions (we need: the own types AND Switch-Adapter types, that give information about the Switch)
- look for for existing Switches (in case this module was started after some Switch-Adapters were already running (maybe with V. 1.2))
After Startup: Module waits for messages from other parties, since there is nothing else to do.
- new Switch in ZMF: send requests to the Switch, so every information is available.
- Switch-Reply or Switch Status message(e.g. Port-Status): save data for the Switch, which is origin of the message.
- Information-Request: Create Reply, with Information for specific or all Switches.
When the Module is started, it will subscribe to four Types of ZMF-messages, which are all coming from a SwitchAdapter: Feature-Reply, Echo-Request, Multipart-Reply and Port-Status. After the Subscriptions are done, the module will search for existing SwitchAdapter-Instances within the ZMF. If one is found the Switch will be listed in the inner list and will send a send a Feature Request and, if the OpenFlow-Version of the Switch is 1.3 or higher, a Port-Description Multipart-Request to the SwitchAdapter.
There are two possible Requests, that are supported by this module: All-Switches and Spefic-Switch-By-Id. If all switches are requested, we send a list with every Switch, which is marked as 'active'(meaning we already have all necassary data for the Switch), back to the requesting module. If a specific Switch is requested, we look up, whether it is available and 'active'. If both is true, the Switch will be sent back, if not we send a NO-REPLY-message.
| MessageType | Comment |
|---|---|
| [[FROM.SWITCH_REGISTRY_MODULE.SWITCHEVENT.ADDED | SwitchRegistryModule#SwitchEvent]] |
| [[FROM.SWITCH_REGISTRY_MODULE.SWITCHEVENT.REMOVED | SwitchRegistryModule#SwitchEvent]] |
| [[FROM.SWITCH_REGISTRY_MODULE.SWITCHEVENT.CHANGED | SwitchRegistryModule#SwitchEvent]] |
| MessageType | Comment |
|---|---|
| [[FROM.SWITCH_ADAPTER.OPENFLOW.FEATURES_REPLY | SwitchAdapter#OpenFlow-from-Switch]] |
| [[FROM.SWITCH_ADAPTER.OPENFLOW.MULTIPART_REPLY | SwitchAdapter#OpenFlow-from-Switch]] |
| [[FROM.SWITCH_ADAPTER.OPENFLOW.PORT_STATUS | SwitchAdapter#OpenFlow-from-Switch]] |
| [[FROM.SWITCH_ADAPTER.OPENFLOW.ECHO_REQUEST | SwitchAdapter#OpenFlow-from-Switch]] |
Here the activity diagrams for used subscriptions:
