Merge into master from pull request #188:
update pyloxi to floodlight/loxigen-artifacts @ fae5788e9a287b77b15f53d75840e6951f2150c5 (https://github.com/floodlight/oftest/pull/188)
diff --git a/src/python/loxi/of13/oxm.py b/src/python/loxi/of13/oxm.py
index 51b1a73..4ff1832 100644
--- a/src/python/loxi/of13/oxm.py
+++ b/src/python/loxi/of13/oxm.py
@@ -1159,6 +1159,98 @@
oxm.subtypes[208652] = bsn_inner_eth_src_masked
+class bsn_inner_vlan_vid(oxm):
+ type_len = 208898
+
+ def __init__(self, value=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!L", self.type_len))
+ packed.append(struct.pack("!H", self.value))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_inner_vlan_vid()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 208898)
+ obj.value = reader.read("!H")[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("bsn_inner_vlan_vid {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.breakable()
+ q.text('}')
+
+oxm.subtypes[208898] = bsn_inner_vlan_vid
+
+class bsn_inner_vlan_vid_masked(oxm):
+ type_len = 209156
+
+ def __init__(self, value=None, value_mask=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = 0
+ if value_mask != None:
+ self.value_mask = value_mask
+ else:
+ self.value_mask = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!L", self.type_len))
+ packed.append(struct.pack("!H", self.value))
+ packed.append(struct.pack("!H", self.value_mask))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_inner_vlan_vid_masked()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 209156)
+ obj.value = reader.read("!H")[0]
+ obj.value_mask = reader.read("!H")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.value != other.value: return False
+ if self.value_mask != other.value_mask: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_inner_vlan_vid_masked {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.text(","); q.breakable()
+ q.text("value_mask = ");
+ q.text("%#x" % self.value_mask)
+ q.breakable()
+ q.text('}')
+
+oxm.subtypes[209156] = bsn_inner_vlan_vid_masked
+
class bsn_l2_cache_hit(oxm):
type_len = 205825
diff --git a/src/python/loxi/of14/oxm.py b/src/python/loxi/of14/oxm.py
index 9abd97f..a3276bf 100644
--- a/src/python/loxi/of14/oxm.py
+++ b/src/python/loxi/of14/oxm.py
@@ -1067,6 +1067,98 @@
oxm.subtypes[208652] = bsn_inner_eth_src_masked
+class bsn_inner_vlan_vid(oxm):
+ type_len = 208898
+
+ def __init__(self, value=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!L", self.type_len))
+ packed.append(struct.pack("!H", self.value))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_inner_vlan_vid()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 208898)
+ obj.value = reader.read("!H")[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("bsn_inner_vlan_vid {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.breakable()
+ q.text('}')
+
+oxm.subtypes[208898] = bsn_inner_vlan_vid
+
+class bsn_inner_vlan_vid_masked(oxm):
+ type_len = 209156
+
+ def __init__(self, value=None, value_mask=None):
+ if value != None:
+ self.value = value
+ else:
+ self.value = 0
+ if value_mask != None:
+ self.value_mask = value_mask
+ else:
+ self.value_mask = 0
+ return
+
+ def pack(self):
+ packed = []
+ packed.append(struct.pack("!L", self.type_len))
+ packed.append(struct.pack("!H", self.value))
+ packed.append(struct.pack("!H", self.value_mask))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_inner_vlan_vid_masked()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 209156)
+ obj.value = reader.read("!H")[0]
+ obj.value_mask = reader.read("!H")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.value != other.value: return False
+ if self.value_mask != other.value_mask: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_inner_vlan_vid_masked {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.text(","); q.breakable()
+ q.text("value_mask = ");
+ q.text("%#x" % self.value_mask)
+ q.breakable()
+ q.text('}')
+
+oxm.subtypes[209156] = bsn_inner_vlan_vid_masked
+
class bsn_l3_interface_class_id(oxm):
type_len = 198660
diff --git a/src/python/loxi/of14/port_desc_prop.py b/src/python/loxi/of14/port_desc_prop.py
index 217e004..468a120 100644
--- a/src/python/loxi/of14/port_desc_prop.py
+++ b/src/python/loxi/of14/port_desc_prop.py
@@ -66,15 +66,11 @@
type = 65535
- def __init__(self, experimenter=None, exp_type=None):
+ def __init__(self, experimenter=None):
if experimenter != None:
self.experimenter = experimenter
else:
self.experimenter = 0
- if exp_type != None:
- self.exp_type = exp_type
- else:
- self.exp_type = 0
return
def pack(self):
@@ -82,7 +78,6 @@
packed.append(struct.pack("!H", self.type))
packed.append(struct.pack("!H", 0)) # placeholder for length at index 1
packed.append(struct.pack("!L", self.experimenter))
- packed.append(struct.pack("!L", self.exp_type))
length = sum([len(x) for x in packed])
packed[1] = struct.pack("!H", length)
return ''.join(packed)
@@ -101,13 +96,11 @@
orig_reader = reader
reader = orig_reader.slice(_length, 4)
obj.experimenter = reader.read("!L")[0]
- obj.exp_type = reader.read("!L")[0]
return obj
def __eq__(self, other):
if type(self) != type(other): return False
if self.experimenter != other.experimenter: return False
- if self.exp_type != other.exp_type: return False
return True
def pretty_print(self, q):
@@ -115,8 +108,6 @@
with q.group():
with q.indent(2):
q.breakable()
- q.text("exp_type = ");
- q.text("%#x" % self.exp_type)
q.breakable()
q.text('}')
@@ -178,6 +169,61 @@
experimenter.subtypes[6035143] = bsn
+class bsn_generation_id(bsn):
+ type = 65535
+ experimenter = 6035143
+ exp_type = 1
+
+ def __init__(self, generation_id=None):
+ if generation_id != None:
+ self.generation_id = generation_id
+ else:
+ self.generation_id = 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("!L", self.experimenter))
+ packed.append(struct.pack("!L", self.exp_type))
+ packed.append(struct.pack("!Q", self.generation_id))
+ length = sum([len(x) for x in packed])
+ packed[1] = struct.pack("!H", length)
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_generation_id()
+ _type = reader.read("!H")[0]
+ assert(_type == 65535)
+ _length = reader.read("!H")[0]
+ orig_reader = reader
+ reader = orig_reader.slice(_length, 4)
+ _experimenter = reader.read("!L")[0]
+ assert(_experimenter == 6035143)
+ _exp_type = reader.read("!L")[0]
+ assert(_exp_type == 1)
+ obj.generation_id = reader.read("!Q")[0]
+ return obj
+
+ def __eq__(self, other):
+ if type(self) != type(other): return False
+ if self.generation_id != other.generation_id: return False
+ return True
+
+ def pretty_print(self, q):
+ q.text("bsn_generation_id {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("generation_id = ");
+ q.text("%#x" % self.generation_id)
+ q.breakable()
+ q.text('}')
+
+bsn.subtypes[1] = bsn_generation_id
+
class bsn_uplink(bsn):
type = 65535
experimenter = 6035143