Merge into master from pull request #114:
update pyloxi to floodlight/loxigen-artifacts@2bdcfd80f3a96740d1b3fb364e... (https://github.com/floodlight/oftest/pull/114)
diff --git a/src/python/loxi/of12/oxm.py b/src/python/loxi/of12/oxm.py
index f116d1a..9f12fc9 100644
--- a/src/python/loxi/of12/oxm.py
+++ b/src/python/loxi/of12/oxm.py
@@ -517,6 +517,98 @@
oxm.subtypes[2147495688] = arp_tpa_masked
+class bsn_egr_port_group_id(oxm):
+ type_len = 200196
+
+ 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("!L", self.value))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_egr_port_group_id()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 200196)
+ obj.value = reader.read("!L")[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_egr_port_group_id {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.breakable()
+ q.text('}')
+
+oxm.subtypes[200196] = bsn_egr_port_group_id
+
+class bsn_egr_port_group_id_masked(oxm):
+ type_len = 200456
+
+ 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("!L", self.value))
+ packed.append(struct.pack("!L", self.value_mask))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_egr_port_group_id_masked()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 200456)
+ obj.value = reader.read("!L")[0]
+ obj.value_mask = reader.read("!L")[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_egr_port_group_id_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[200456] = bsn_egr_port_group_id_masked
+
class bsn_global_vrf_allowed(oxm):
type_len = 198145
diff --git a/src/python/loxi/of13/common.py b/src/python/loxi/of13/common.py
index 93a4faf..c206d24 100644
--- a/src/python/loxi/of13/common.py
+++ b/src/python/loxi/of13/common.py
@@ -1084,56 +1084,6 @@
q.text('}')
-class experimenter_stats_header(loxi.OFObject):
- subtypes = {}
-
-
- def __init__(self, experimenter=None, subtype=None):
- if experimenter != None:
- self.experimenter = experimenter
- else:
- self.experimenter = 0
- if subtype != None:
- self.subtype = subtype
- else:
- self.subtype = 0
- return
-
- def pack(self):
- packed = []
- packed.append(struct.pack("!L", self.experimenter))
- packed.append(struct.pack("!L", self.subtype))
- return ''.join(packed)
-
- @staticmethod
- def unpack(reader):
- subtype, = reader.peek('!L', 0)
- subclass = experimenter_stats_header.subtypes.get(subtype)
- if subclass:
- return subclass.unpack(reader)
-
- obj = experimenter_stats_header()
- obj.experimenter = reader.read("!L")[0]
- obj.subtype = 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.subtype != other.subtype: return False
- return True
-
- def pretty_print(self, q):
- q.text("experimenter_stats_header {")
- with q.group():
- with q.indent(2):
- q.breakable()
- q.text("subtype = ");
- q.text("%#x" % self.subtype)
- q.breakable()
- q.text('}')
-
-
class flow_stats_entry(loxi.OFObject):
def __init__(self, table_id=None, duration_sec=None, duration_nsec=None, priority=None, idle_timeout=None, hard_timeout=None, flags=None, cookie=None, packet_count=None, byte_count=None, match=None, instructions=None):
@@ -2982,7 +2932,7 @@
_length = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_length - (2 + 2))
- obj.instruction_ids = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+ obj.instruction_ids = loxi.generic_util.unpack_list(reader, instruction_id.instruction_id.unpack)
return obj
def __eq__(self, other):
@@ -3029,7 +2979,7 @@
_length = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_length - (2 + 2))
- obj.instruction_ids = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+ obj.instruction_ids = loxi.generic_util.unpack_list(reader, instruction_id.instruction_id.unpack)
return obj
def __eq__(self, other):
diff --git a/src/python/loxi/of13/oxm.py b/src/python/loxi/of13/oxm.py
index a2f5053..65536e8 100644
--- a/src/python/loxi/of13/oxm.py
+++ b/src/python/loxi/of13/oxm.py
@@ -521,6 +521,98 @@
oxm.subtypes[2147495688] = arp_tpa_masked
+class bsn_egr_port_group_id(oxm):
+ type_len = 200196
+
+ 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("!L", self.value))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_egr_port_group_id()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 200196)
+ obj.value = reader.read("!L")[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_egr_port_group_id {")
+ with q.group():
+ with q.indent(2):
+ q.breakable()
+ q.text("value = ");
+ q.text("%#x" % self.value)
+ q.breakable()
+ q.text('}')
+
+oxm.subtypes[200196] = bsn_egr_port_group_id
+
+class bsn_egr_port_group_id_masked(oxm):
+ type_len = 200456
+
+ 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("!L", self.value))
+ packed.append(struct.pack("!L", self.value_mask))
+ return ''.join(packed)
+
+ @staticmethod
+ def unpack(reader):
+ obj = bsn_egr_port_group_id_masked()
+ _type_len = reader.read("!L")[0]
+ assert(_type_len == 200456)
+ obj.value = reader.read("!L")[0]
+ obj.value_mask = reader.read("!L")[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_egr_port_group_id_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[200456] = bsn_egr_port_group_id_masked
+
class bsn_global_vrf_allowed(oxm):
type_len = 198145