update pyloxi to floodlight/loxigen-artifacts @ f9dd10108ee6f7f770b4433e23eaf875a8abf1df
diff --git a/src/python/loxi/of12/action.py b/src/python/loxi/of12/action.py
index 5cfd754..72685a7 100644
--- a/src/python/loxi/of12/action.py
+++ b/src/python/loxi/of12/action.py
@@ -48,7 +48,7 @@
obj.type = reader.read("!H")[0]
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -106,7 +106,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.experimenter = reader.read("!L")[0]
obj.data = str(reader.read_all())
return obj
@@ -165,7 +165,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
_experimenter = reader.read("!L")[0]
assert(_experimenter == 6035143)
obj.subtype = reader.read("!L")[0]
@@ -217,7 +217,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
_experimenter = reader.read("!L")[0]
assert(_experimenter == 6035143)
_subtype = reader.read("!L")[0]
@@ -283,7 +283,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
_experimenter = reader.read("!L")[0]
assert(_experimenter == 6035143)
_subtype = reader.read("!L")[0]
@@ -349,7 +349,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
_experimenter = reader.read("!L")[0]
assert(_experimenter == 6035143)
_subtype = reader.read("!L")[0]
@@ -396,7 +396,7 @@
assert(_type == 12)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -436,7 +436,7 @@
assert(_type == 11)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -476,7 +476,7 @@
assert(_type == 16)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -516,7 +516,7 @@
assert(_type == 24)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -560,7 +560,7 @@
assert(_type == 22)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.group_id = reader.read("!L")[0]
return obj
@@ -618,7 +618,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
_experimenter = reader.read("!L")[0]
assert(_experimenter == 8992)
obj.subtype = reader.read("!H")[0]
@@ -668,7 +668,7 @@
assert(_type == 65535)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
_experimenter = reader.read("!L")[0]
assert(_experimenter == 8992)
_subtype = reader.read("!H")[0]
@@ -723,7 +723,7 @@
assert(_type == 0)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.port = util.unpack_port_no(reader)
obj.max_len = reader.read("!H")[0]
reader.skip(6)
@@ -777,7 +777,7 @@
assert(_type == 20)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.ethertype = reader.read("!H")[0]
reader.skip(2)
return obj
@@ -821,7 +821,7 @@
assert(_type == 18)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
reader.skip(4)
return obj
@@ -866,7 +866,7 @@
assert(_type == 19)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.ethertype = reader.read("!H")[0]
reader.skip(2)
return obj
@@ -915,7 +915,7 @@
assert(_type == 17)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.ethertype = reader.read("!H")[0]
reader.skip(2)
return obj
@@ -965,7 +965,7 @@
assert(_type == 25)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.field = oxm.oxm.unpack(reader)
return obj
@@ -1013,7 +1013,7 @@
assert(_type == 15)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.mpls_ttl = reader.read("!B")[0]
reader.skip(3)
return obj
@@ -1062,7 +1062,7 @@
assert(_type == 23)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.nw_ttl = reader.read("!B")[0]
reader.skip(3)
return obj
@@ -1110,7 +1110,7 @@
assert(_type == 21)
_len = reader.read("!H")[0]
orig_reader = reader
- reader = orig_reader.slice(_len - (2 + 2))
+ reader = orig_reader.slice(_len, 4)
obj.queue_id = reader.read("!L")[0]
return obj