update pyloxi to floodlight/loxigen-artifacts @ cb7d6d4063ed4d311d105e20f0844a54c4bd9916
diff --git a/src/python/loxi/of11/message.py b/src/python/loxi/of11/message.py
index eee4f6e..f9586f7 100644
--- a/src/python/loxi/of11/message.py
+++ b/src/python/loxi/of11/message.py
@@ -8,14 +8,12 @@
 
 import struct
 import loxi
-import const
-import action
-import message
-import instruction
-import common
 import util
 import loxi.generic_util
 
+import sys
+ofp = sys.modules['loxi.of11']
+
 class message(loxi.OFObject):
     subtypes = {}
 
@@ -378,7 +376,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         return
 
     def pack(self):
@@ -424,7 +422,7 @@
         reader.skip(4)
         obj.cookie = reader.read("!Q")[0]
         obj.cookie_mask = reader.read("!Q")[0]
-        obj.match = common.match.unpack(reader)
+        obj.match = ofp.match.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -1580,7 +1578,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 10)
-        obj.interfaces = loxi.generic_util.unpack_list(reader, common.bsn_interface.unpack)
+        obj.interfaces = loxi.generic_util.unpack_list(reader, ofp.common.bsn_interface.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3015,7 +3013,7 @@
         if vport != None:
             self.vport = vport
         else:
-            self.vport = common.bsn_vport()
+            self.vport = ofp.bsn_vport()
         return
 
     def pack(self):
@@ -3046,7 +3044,7 @@
         assert(_experimenter == 6035143)
         _subtype = reader.read("!L")[0]
         assert(_subtype == 15)
-        obj.vport = common.bsn_vport.unpack(reader)
+        obj.vport = ofp.bsn_vport.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -3604,7 +3602,7 @@
         reader.skip(3)
         obj.capabilities = reader.read("!L")[0]
         obj.reserved = reader.read("!L")[0]
-        obj.ports = loxi.generic_util.unpack_list(reader, common.port_desc.unpack)
+        obj.ports = loxi.generic_util.unpack_list(reader, ofp.common.port_desc.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3763,7 +3761,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -3822,8 +3820,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -3948,7 +3946,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -4003,8 +4001,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4128,7 +4126,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -4183,8 +4181,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4308,7 +4306,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -4363,8 +4361,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4566,7 +4564,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -4621,8 +4619,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4746,7 +4744,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         if instructions != None:
             self.instructions = instructions
         else:
@@ -4801,8 +4799,8 @@
         obj.out_group = reader.read("!L")[0]
         obj.flags = reader.read("!H")[0]
         reader.skip(2)
-        obj.match = common.match.unpack(reader)
-        obj.instructions = loxi.generic_util.unpack_list(reader, instruction.instruction.unpack)
+        obj.match = ofp.match.unpack(reader)
+        obj.instructions = loxi.generic_util.unpack_list(reader, ofp.instruction.instruction.unpack)
         return obj
 
     def __eq__(self, other):
@@ -4921,7 +4919,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         return
 
     def pack(self):
@@ -4966,7 +4964,7 @@
         reader.skip(2)
         obj.packet_count = reader.read("!Q")[0]
         obj.byte_count = reader.read("!Q")[0]
-        obj.match = common.match.unpack(reader)
+        obj.match = ofp.match.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -5078,7 +5076,7 @@
         assert(_stats_type == 1)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.flow_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.flow_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -5146,7 +5144,7 @@
         if match != None:
             self.match = match
         else:
-            self.match = common.match()
+            self.match = ofp.match()
         return
 
     def pack(self):
@@ -5192,7 +5190,7 @@
         reader.skip(4)
         obj.cookie = reader.read("!Q")[0]
         obj.cookie_mask = reader.read("!Q")[0]
-        obj.match = common.match.unpack(reader)
+        obj.match = ofp.match.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -5435,7 +5433,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -5526,7 +5524,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -5616,7 +5614,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -5700,7 +5698,7 @@
         assert(_stats_type == 7)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.group_desc_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.group_desc_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -5934,7 +5932,7 @@
         obj.group_type = reader.read("!B")[0]
         reader.skip(1)
         obj.group_id = reader.read("!L")[0]
-        obj.buckets = loxi.generic_util.unpack_list(reader, common.bucket.unpack)
+        obj.buckets = loxi.generic_util.unpack_list(reader, ofp.common.bucket.unpack)
         return obj
 
     def __eq__(self, other):
@@ -6018,7 +6016,7 @@
         assert(_stats_type == 6)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.group_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.group_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -6518,7 +6516,7 @@
         obj.in_port = util.unpack_port_no(reader)
         _actions_len = reader.read("!H")[0]
         reader.skip(6)
-        obj.actions = loxi.generic_util.unpack_list(reader.slice(_actions_len), action.action.unpack)
+        obj.actions = loxi.generic_util.unpack_list(reader.slice(_actions_len), ofp.action.action.unpack)
         obj.data = str(reader.read_all())
         return obj
 
@@ -6795,7 +6793,7 @@
         assert(_stats_type == 4)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.port_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.port_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -6924,7 +6922,7 @@
         if desc != None:
             self.desc = desc
         else:
-            self.desc = common.port_desc()
+            self.desc = ofp.port_desc()
         return
 
     def pack(self):
@@ -6953,7 +6951,7 @@
         obj.xid = reader.read("!L")[0]
         obj.reason = reader.read("!B")[0]
         reader.skip(7)
-        obj.desc = common.port_desc.unpack(reader)
+        obj.desc = ofp.port_desc.unpack(reader)
         return obj
 
     def __eq__(self, other):
@@ -7029,7 +7027,7 @@
         obj.xid = reader.read("!L")[0]
         obj.port = util.unpack_port_no(reader)
         reader.skip(4)
-        obj.queues = loxi.generic_util.unpack_list(reader, common.packet_queue.unpack)
+        obj.queues = loxi.generic_util.unpack_list(reader, ofp.common.packet_queue.unpack)
         return obj
 
     def __eq__(self, other):
@@ -7253,7 +7251,7 @@
         assert(_stats_type == 5)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.queue_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.queue_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -7729,7 +7727,7 @@
         assert(_stats_type == 3)
         obj.flags = reader.read("!H")[0]
         reader.skip(4)
-        obj.entries = loxi.generic_util.unpack_list(reader, common.table_stats_entry.unpack)
+        obj.entries = loxi.generic_util.unpack_list(reader, ofp.common.table_stats_entry.unpack)
         return obj
 
     def __eq__(self, other):
@@ -7838,8 +7836,8 @@
 
 def parse_message(buf):
     msg_ver, msg_type, msg_len, msg_xid = parse_header(buf)
-    if msg_ver != const.OFP_VERSION and msg_type != const.OFPT_HELLO:
-        raise loxi.ProtocolError("wrong OpenFlow version (expected %d, got %d)" % (const.OFP_VERSION, msg_ver))
+    if msg_ver != ofp.OFP_VERSION and msg_type != ofp.OFPT_HELLO:
+        raise loxi.ProtocolError("wrong OpenFlow version (expected %d, got %d)" % (ofp.OFP_VERSION, msg_ver))
     if len(buf) != msg_len:
         raise loxi.ProtocolError("incorrect message size")
     return message.unpack(loxi.generic_util.OFReader(buf))