update pyloxi to loxigen-artifacts @ 8d47a63310c888e276c93b8e45d4ddbf81fc8e0a
diff --git a/src/python/loxi/of12/common.py b/src/python/loxi/of12/common.py
index 37da810..cba725f 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, 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):
+ 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, rate_limit=None, if_name=None):
if flags != None:
self.flags = flags
else:
@@ -175,6 +175,10 @@
self.vpn = vpn
else:
self.vpn = 0
+ if rate_limit != None:
+ self.rate_limit = rate_limit
+ else:
+ self.rate_limit = 0
if if_name != None:
self.if_name = if_name
else:
@@ -196,6 +200,7 @@
packed.append(struct.pack("!B", self.ttl))
packed.append('\x00' * 2)
packed.append(struct.pack("!L", self.vpn))
+ packed.append(struct.pack("!L", self.rate_limit))
packed.append(struct.pack("!16s", self.if_name))
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
@@ -220,6 +225,7 @@
obj.ttl = reader.read("!B")[0]
reader.skip(2)
obj.vpn = reader.read("!L")[0]
+ obj.rate_limit = reader.read("!L")[0]
obj.if_name = reader.read("!16s")[0].rstrip("\x00")
return obj
@@ -235,6 +241,7 @@
if self.dscp != other.dscp: return False
if self.ttl != other.ttl: return False
if self.vpn != other.vpn: return False
+ if self.rate_limit != other.rate_limit: return False
if self.if_name != other.if_name: return False
return True
@@ -273,6 +280,9 @@
q.text("vpn = ");
q.text("%#x" % self.vpn)
q.text(","); q.breakable()
+ q.text("rate_limit = ");
+ q.text("%#x" % self.rate_limit)
+ q.text(","); q.breakable()
q.text("if_name = ");
q.pp(self.if_name)
q.breakable()
diff --git a/src/python/loxi/of12/const.py b/src/python/loxi/of12/const.py
index ecb261e..94638e7 100644
--- a/src/python/loxi/of12/const.py
+++ b/src/python/loxi/of12/const.py
@@ -215,12 +215,14 @@
OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
+OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
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',
+ 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
}
# Identifiers from group ofp_bsn_vport_q_in_q_untagged