update pyloxi to c47bc6facb2869a7833b8694b7a20b3113284d94
diff --git a/src/python/loxi/of13/action.py b/src/python/loxi/of13/action.py
index 645916a..a1e7877 100644
--- a/src/python/loxi/of13/action.py
+++ b/src/python/loxi/of13/action.py
@@ -11,6 +11,7 @@
import util
import loxi.generic_util
import loxi
+import oxm # for unpack
def unpack_list(reader):
def deserializer(reader, typ):
@@ -859,15 +860,17 @@
if field != None:
self.field = field
else:
- self.field = ''
+ self.field = None
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(self.field)
+ packed.append(self.field.pack())
length = sum([len(x) for x in packed])
+ packed.append(loxi.generic_util.pad_to(8, length))
+ length += len(packed[-1])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -881,7 +884,8 @@
_type = reader.read("!H")[0]
assert(_type == 25)
_len = reader.read("!H")[0]
- obj.field = str(reader.read_all())
+ obj.field = oxm.unpack(reader)
+ reader.skip_align()
return obj
def __eq__(self, other):