Signed-off-by: Simon Horman <[email protected]>

---
v3
* First post
---
 ryu/ofproto/ofproto_v1_4_parser.py | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/ryu/ofproto/ofproto_v1_4_parser.py 
b/ryu/ofproto/ofproto_v1_4_parser.py
index 39bc564..499f9f2 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -5085,6 +5085,30 @@ class OFPPortModPropEthernet(StringifyMixin):
         return buf
 
 
+class OFPPortModPropOptical(StringifyMixin):
+    def __init__(self, type_=None, length=None, configure=None,
+                 freq_lmda=None, fl_offset=None, grid_span=None,
+                 tx_pwr=None):
+        self.type = type_
+        self.length = length
+        self.configure = configure
+        self.freq_lmda = freq_lmda
+        self.fl_offset = fl_offset
+        self.grid_span = grid_span
+        self.tx_pwr = tx_pwr
+
+    def serialize(self):
+        # fixup
+        self.length = struct.calcsize(
+            ofproto.OFP_PORT_MOD_PROP_OPTICAL_PACK_STR)
+
+        buf = bytearray()
+        msg_pack_into(ofproto.OFP_PORT_MOD_PROP_OPTICAL_PACK_STR, buf, 0,
+                      self.type, self.length, self.configure, self.freq_lmda,
+                      self.fl_offset, self.grid_span, self.tx_pwr)
+        return buf
+
+
 @_set_msg_type(ofproto.OFPT_PORT_MOD)
 class OFPPortMod(MsgBase):
     """
-- 
1.8.5.2


------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to