update pyloxi to loxigen-artifacts @ c5aa7c7e694f3679b53f92844eb955d74719ca95
diff --git a/src/python/loxi/of12/common.py b/src/python/loxi/of12/common.py
index a1f2a09..37da810 100644
--- a/src/python/loxi/of12/common.py
+++ b/src/python/loxi/of12/common.py
@@ -134,7 +134,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:
@@ -143,6 +143,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:
@@ -183,6 +187,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))
@@ -206,6 +211,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]
@@ -221,6 +227,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
@@ -242,6 +249,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()