update pyloxi to floodlight/loxigen-artifacts@0b4fb635bf2c6839a667f01fcc5afb9cc7da3815
diff --git a/src/python/loxi/of13/bsn_tlv.py b/src/python/loxi/of13/bsn_tlv.py
index dd3eced..f169a6d 100644
--- a/src/python/loxi/of13/bsn_tlv.py
+++ b/src/python/loxi/of13/bsn_tlv.py
@@ -114,6 +114,53 @@
bsn_tlv.subtypes[10] = broadcast_query_timeout
+class circuit_id(bsn_tlv):
+ type = 14
+
+ def __init__(self, value=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = ''
+ 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(self.value)
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = circuit_id()
+ _type = reader.read("!H")[0]
+ assert(_type == 14)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length - (2 + 2))
+ obj.value = str(reader.read_all())
+ 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("circuit_id {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.pp(self.value)
+ q.breakable()
+ q.text('}')
+
+bsn_tlv.subtypes[14] = circuit_id
+
class idle_notification(bsn_tlv):
type = 7