update pyloxi to floodlight/loxigen-artifacts @ cb7d6d4063ed4d311d105e20f0844a54c4bd9916
diff --git a/src/python/loxi/of12/common.py b/src/python/loxi/of12/common.py
index b091544..8f167f1 100644
--- a/src/python/loxi/of12/common.py
+++ b/src/python/loxi/of12/common.py
@@ -8,15 +8,12 @@
import struct
import loxi
-import const
-import action
-import oxm
-import message
-import instruction
-import common
import util
import loxi.generic_util
+import sys
+ofp = sys.modules['loxi.of12']
+
class bsn_interface(loxi.OFObject):
def __init__(self, hw_addr=None, name=None, ipv4_addr=None, ipv4_netmask=None):
@@ -431,7 +428,7 @@
obj.watch_port = util.unpack_port_no(reader)
obj.watch_group = reader.read("!L")[0]
reader.skip(4)
- obj.actions = loxi.generic_util.unpack_list(reader, action.action.unpack)
+ obj.actions = loxi.generic_util.unpack_list(reader, ofp.action.action.unpack)
return obj
def __eq__(self, other):
@@ -550,7 +547,7 @@
if match != None:
self.match = match
else:
- self.match = common.match()
+ self.match = ofp.match()
if instructions != None:
self.instructions = instructions
else:
@@ -594,8 +591,8 @@
obj.cookie = reader.read("!Q")[0]
obj.packet_count = reader.read("!Q")[0]
obj.byte_count = reader.read("!Q")[0]
- 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):
@@ -691,7 +688,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):
@@ -769,7 +766,7 @@
reader.skip(4)
obj.packet_count = reader.read("!Q")[0]
obj.byte_count = reader.read("!Q")[0]
- obj.bucket_stats = loxi.generic_util.unpack_list(reader, common.bucket_counter.unpack)
+ obj.bucket_stats = loxi.generic_util.unpack_list(reader, ofp.common.bucket_counter.unpack)
return obj
def __eq__(self, other):
@@ -832,7 +829,7 @@
_length = reader.read("!H")[0]
orig_reader = reader
reader = orig_reader.slice(_length, 4)
- obj.oxm_list = loxi.generic_util.unpack_list(reader, oxm.oxm.unpack)
+ obj.oxm_list = loxi.generic_util.unpack_list(reader, ofp.oxm.oxm.unpack)
orig_reader.skip_align()
return obj
@@ -889,7 +886,7 @@
orig_reader = reader
reader = orig_reader.slice(_len, 10)
reader.skip(6)
- obj.properties = loxi.generic_util.unpack_list(reader, common.queue_prop.unpack)
+ obj.properties = loxi.generic_util.unpack_list(reader, ofp.common.queue_prop.unpack)
return obj
def __eq__(self, other):