update pyloxi to floodlight/loxigen-artifacts @ d8618ceae4c7b791eeb068ab18df3ebdea073bf2
diff --git a/src/python/loxi/of14/action_id.py b/src/python/loxi/of14/action_id.py
index 7b2e74b..4ebcfcd 100644
--- a/src/python/loxi/of14/action_id.py
+++ b/src/python/loxi/of14/action_id.py
@@ -10,6 +10,7 @@
import loxi
import const
import port_desc_prop
+import bsn_tlv
import meter_band
import table_mod_prop
import instruction
@@ -230,6 +231,52 @@
bsn.subtypes[4] = bsn_checksum
+class bsn_gentable(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 5
+
+ def __init__(self):
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for len at index 1
+ packed.append(struct.pack("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.subtype))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_gentable()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _len = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_len - (2 + 2))
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _subtype = reader.read("!L")[0]
+ assert(_subtype == 5)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_gentable {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[5] = bsn_gentable
+
class bsn_mirror(bsn):
type = 65535
experimenter = 6035143