update pyloxi to loxigen-artifacts @ c5aa7c7e694f3679b53f92844eb955d74719ca95
diff --git a/src/python/loxi/of11/action.py b/src/python/loxi/of11/action.py
index 53056ea..42f8340 100644
--- a/src/python/loxi/of11/action.py
+++ b/src/python/loxi/of11/action.py
@@ -183,6 +183,61 @@
experimenter.subtypes[6035143] = bsn
+class bsn_checksum(bsn):
+ type = 65535
+ experimenter = 6035143
+ subtype = 4
+
+ def __init__(self, checksum=None):
+ if checksum != None:
+ self.checksum = checksum
+ else:
+ self.checksum = 0
+ 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))
+ packed.append(util.pack_checksum_128(self.checksum))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_checksum()
+ _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 == 4)
+ obj.checksum = util.unpack_checksum_128(reader)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.checksum != other.checksum: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_checksum {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("checksum = ");
+ q.pp(self.checksum)
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[4] = bsn_checksum
+
class bsn_mirror(bsn):
type = 65535
experimenter = 6035143
diff --git a/src/python/loxi/of11/common.py b/src/python/loxi/of11/common.py
index 88e1c79..99f1d36 100644
--- a/src/python/loxi/of11/common.py
+++ b/src/python/loxi/of11/common.py
@@ -133,7 +133,7 @@
class bsn_vport_l2gre(bsn_vport):
type = 1
- def __init__(self, flags=None, port_no=None, local_mac=None, nh_mac=None, src_ip=None, dst_ip=None, dscp=None, ttl=None, vpn=None, if_name=None):
+ def __init__(self, flags=None, port_no=None, loopback_port_no=None, local_mac=None, nh_mac=None, src_ip=None, dst_ip=None, dscp=None, ttl=None, vpn=None, if_name=None):
if flags != None:
self.flags = flags
else:
@@ -142,6 +142,10 @@
self.port_no = port_no
else:
self.port_no = 0
+ if loopback_port_no != None:
+ self.loopback_port_no = loopback_port_no
+ else:
+ self.loopback_port_no = 0
if local_mac != None:
self.local_mac = local_mac
else:
@@ -182,6 +186,7 @@
packed.append(struct.pack("!H", 0)) # placeholder for length at index 1
packed.append(struct.pack("!L", self.flags))
packed.append(util.pack_port_no(self.port_no))
+ packed.append(util.pack_port_no(self.loopback_port_no))
packed.append(struct.pack("!6B", *self.local_mac))
packed.append(struct.pack("!6B", *self.nh_mac))
packed.append(struct.pack("!L", self.src_ip))
@@ -205,6 +210,7 @@
reader = orig_reader.slice(_length - (2 + 2))
obj.flags = reader.read("!L")[0]
obj.port_no = util.unpack_port_no(reader)
+ obj.loopback_port_no = util.unpack_port_no(reader)
obj.local_mac = list(reader.read('!6B'))
obj.nh_mac = list(reader.read('!6B'))
obj.src_ip = reader.read("!L")[0]
@@ -220,6 +226,7 @@
if type(self) != type(other): return False
if self.flags != other.flags: return False
if self.port_no != other.port_no: return False
+ if self.loopback_port_no != other.loopback_port_no: return False
if self.local_mac != other.local_mac: return False
if self.nh_mac != other.nh_mac: return False
if self.src_ip != other.src_ip: return False
@@ -241,6 +248,9 @@
q.text("port_no = ");
q.text(util.pretty_port(self.port_no))
q.text(","); q.breakable()
+ q.text("loopback_port_no = ");
+ q.text(util.pretty_port(self.loopback_port_no))
+ q.text(","); q.breakable()
q.text("local_mac = ");
q.text(util.pretty_mac(self.local_mac))
q.text(","); q.breakable()
diff --git a/src/python/loxi/of11/const.py b/src/python/loxi/of11/const.py
index 3366ba1..a951bcf 100644
--- a/src/python/loxi/of11/const.py
+++ b/src/python/loxi/of11/const.py
@@ -190,11 +190,13 @@
OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
+OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
ofp_bsn_vport_l2gre_flags_map = {
1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
+ 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
}
# Identifiers from group ofp_bsn_vport_q_in_q_untagged