update pyloxi to latest
diff --git a/src/python/loxi/of13/bsn_tlv.py b/src/python/loxi/of13/bsn_tlv.py
index a1f39e7..259a474 100644
--- a/src/python/loxi/of13/bsn_tlv.py
+++ b/src/python/loxi/of13/bsn_tlv.py
@@ -3305,6 +3305,53 @@
bsn_tlv.subtypes[9] = unicast_query_timeout
+class vlan_pcp(bsn_tlv):
+ type = 72
+
+ def __init__(self, value=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 1
+ packed.append(struct.pack("!B", self.value))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = vlan_pcp()
+ _type = reader.read("!H")[0]
+ assert(_type == 72)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length, 4)
+ obj.value = reader.read("!B")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.value != other.value: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("vlan_pcp {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.breakable()
+ q.text('}')
+
+bsn_tlv.subtypes[72] = vlan_pcp
+
class vlan_vid(bsn_tlv):
type = 6
diff --git a/src/python/loxi/of14/bsn_tlv.py b/src/python/loxi/of14/bsn_tlv.py
index 6671b17..fa96d1d 100644
--- a/src/python/loxi/of14/bsn_tlv.py
+++ b/src/python/loxi/of14/bsn_tlv.py
@@ -3305,6 +3305,53 @@
bsn_tlv.subtypes[9] = unicast_query_timeout
+class vlan_pcp(bsn_tlv):
+ type = 72
+
+ def __init__(self, value=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!H", self.type))
+ packed.append(struct.pack("!H", 0)) # placeholder for length at index 1
+ packed.append(struct.pack("!B", self.value))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = vlan_pcp()
+ _type = reader.read("!H")[0]
+ assert(_type == 72)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length, 4)
+ obj.value = reader.read("!B")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.value != other.value: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("vlan_pcp {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.breakable()
+ q.text('}')
+
+bsn_tlv.subtypes[72] = vlan_pcp
+
class vlan_vid(bsn_tlv):
type = 6