1717from pyof .v0x04 .controller2switch .features_reply import FeaturesReply
1818from pyof .v0x04 .controller2switch .features_request import FeaturesRequest
1919from pyof .v0x04 .controller2switch .flow_mod import FlowMod
20+ from pyof .v0x04 .controller2switch .get_async_reply import GetAsyncReply
21+ from pyof .v0x04 .controller2switch .get_async_request import GetAsyncRequest
2022from pyof .v0x04 .controller2switch .get_config_reply import GetConfigReply
2123from pyof .v0x04 .controller2switch .get_config_request import GetConfigRequest
24+ from pyof .v0x04 .controller2switch .group_mod import GroupMod
25+ from pyof .v0x04 .controller2switch .meter_mod import MeterMod
2226from pyof .v0x04 .controller2switch .multipart_reply import MultipartReply
27+ from pyof .v0x04 .controller2switch .multipart_request import MultipartRequest
2328from pyof .v0x04 .controller2switch .packet_out import PacketOut
2429from pyof .v0x04 .controller2switch .port_mod import PortMod
2530from pyof .v0x04 .controller2switch .queue_get_config_reply import \
2631 QueueGetConfigReply
2732from pyof .v0x04 .controller2switch .queue_get_config_request import \
2833 QueueGetConfigRequest
34+ from pyof .v0x04 .controller2switch .role_reply import RoleReply
35+ from pyof .v0x04 .controller2switch .role_request import RoleRequest
36+ from pyof .v0x04 .controller2switch .set_async import SetAsync
2937from pyof .v0x04 .controller2switch .set_config import SetConfig
38+ from pyof .v0x04 .controller2switch .table_mod import TableMod
3039# Importing symmetric messages
3140from pyof .v0x04 .symmetric .echo_reply import EchoReply
3241from pyof .v0x04 .symmetric .echo_request import EchoRequest
@@ -51,27 +60,64 @@ def new_message_from_message_type(message_type):
5160 message_type = str (message_type )
5261
5362 available_classes = {
63+
64+ # Symetric/Immutable messages
5465 str (Type .OFPT_HELLO ): Hello ,
5566 str (Type .OFPT_ERROR ): ErrorMsg ,
5667 str (Type .OFPT_ECHO_REQUEST ): EchoRequest ,
5768 str (Type .OFPT_ECHO_REPLY ): EchoReply ,
5869 str (Type .OFPT_EXPERIMENTER ): ExperimenterHeader ,
70+
71+ # Switch configuration messages
72+ # Controller/Switch messages
5973 str (Type .OFPT_FEATURES_REQUEST ): FeaturesRequest ,
6074 str (Type .OFPT_FEATURES_REPLY ): FeaturesReply ,
6175 str (Type .OFPT_GET_CONFIG_REQUEST ): GetConfigRequest ,
6276 str (Type .OFPT_GET_CONFIG_REPLY ): GetConfigReply ,
6377 str (Type .OFPT_SET_CONFIG ): SetConfig ,
78+
79+ # Async messages
6480 str (Type .OFPT_PACKET_IN ): PacketIn ,
6581 str (Type .OFPT_FLOW_REMOVED ): FlowRemoved ,
6682 str (Type .OFPT_PORT_STATUS ): PortStatus ,
83+
84+ # Controller command messages
85+ # Controller/Switch message
6786 str (Type .OFPT_PACKET_OUT ): PacketOut ,
6887 str (Type .OFPT_FLOW_MOD ): FlowMod ,
88+ str (Type .OFPT_GROUP_MOD ): GroupMod ,
6989 str (Type .OFPT_PORT_MOD ): PortMod ,
90+ str (Type .OFPT_TABLE_MOD ): TableMod ,
91+
92+ # Multipart messages.
93+ # Controller/Switch message
94+ str (Type .OFPT_MULTIPART_REPLY ): MultipartReply ,
95+ str (Type .OFPT_MULTIPART_REQUEST ): MultipartRequest ,
96+
97+ # Barrier messages
98+ # Controller/Switch message
7099 str (Type .OFPT_BARRIER_REQUEST ): BarrierRequest ,
71100 str (Type .OFPT_BARRIER_REPLY ): BarrierReply ,
101+
102+ # Queue Configuration messages
103+ # Controller/Switch message
72104 str (Type .OFPT_QUEUE_GET_CONFIG_REQUEST ): QueueGetConfigRequest ,
73105 str (Type .OFPT_QUEUE_GET_CONFIG_REPLY ): QueueGetConfigReply ,
74- str (Type .OFPT_MULTIPART_REPLY ): MultipartReply ,
106+
107+ # Controller role change request message
108+ # Controller/Switch message
109+ str (Type .OFPT_ROLE_REQUEST ): RoleRequest ,
110+ str (Type .OFPT_ROLE_REPLY ): RoleReply ,
111+
112+ # Asynchronous message configuration
113+ # Controller/Switch message
114+ str (Type .OFPT_GET_ASYNC_REQUEST ): GetAsyncRequest ,
115+ str (Type .OFPT_GET_ASYNC_REPLY ): GetAsyncReply ,
116+ str (Type .OFPT_SET_ASYNC ): SetAsync ,
117+
118+ # Meters and rate limiters configuration messages
119+ # Controller/Switch message
120+ str (Type .OFPT_METER_MOD ): MeterMod ,
75121 }
76122
77123 if message_type not in available_classes :
0 commit comments