update pyloxi to loxigen-artifacts @ c5aa7c7e694f3679b53f92844eb955d74719ca95
diff --git a/src/python/loxi/of13/common.py b/src/python/loxi/of13/common.py
index 105019e..43e1ee6 100644
--- a/src/python/loxi/of13/common.py
+++ b/src/python/loxi/of13/common.py
@@ -972,7 +972,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:
@@ -981,6 +981,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:
@@ -1021,6 +1025,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))
@@ -1044,6 +1049,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]
@@ -1059,6 +1065,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
@@ -1080,6 +1087,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()
@@ -1205,6 +1215,60 @@
bsn_vport.subtypes[0] = bsn_vport_q_in_q
+class bsn_vrf_counter_stats_entry(loxi.OFObject):
+
+ def __init__(self, vrf=None, values=None):
+ if vrf != None:
+ self.vrf = vrf
+ else:
+ self.vrf = 0
+ if values != None:
+ self.values = values
+ else:
+ self.values = []
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 0
+ packed.append('\x00' * 2)
+ packed.append(struct.pack("!L", self.vrf))
+ packed.append(loxi.generic_util.pack_list(self.values))
+ length = sum([len(x) for x in packed])
+ packed[0] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_vrf_counter_stats_entry()
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (0 + 2))
+ reader.skip(2)
+ obj.vrf = reader.read("!L")[0]
+ obj.values = loxi.generic_util.unpack_list(reader, common.uint64.unpack)
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.vrf != other.vrf: return False
+ if self.values != other.values: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_vrf_counter_stats_entry {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("vrf = ");
+ q.text("%#x" % self.vrf)
+ q.text(","); q.breakable()
+ q.text("values = ");
+ q.pp(self.values)
+ q.breakable()
+ q.text('}')
+
+
class bucket(loxi.OFObject):
def __init__(self, weight=None, watch_port=None, watch_group=None, actions=None):