[VOL-2241] Python 3 refactor of pyvoltha
Majority of work was manual fixes to bytes and strings types, which are
different in py3, but same in py2. As the OMCI library does a lot of
these comparisons and scapy then renders packets, this was frequently
nontrival to debug.
Also:
- Removed grpc dep which wasn't being used, not py3 compatible
- s/Alarms/Events/ to work with protobuf changes per VOL-2224
- Automatic fixes via modernize tooling
- Removed unused OrderedWeakValueDict code
- Removed frameio send_frame specific to Darwin (MacOS), which had no
corresponding linux code
- Use library functions for hex and unicode conversions
- Various other cleanups and fixes (EOL whitespace, etc.)
Also more (Matt):
- handle stringify better, check if already string
- use binary string for binary work
- import new thread paths
- update requirements.txt for newer libraries needed with newer python
- return proper tuple for unpacking
- bytes string formatting fixed
- fix mock task unit test
Even more (Zack):
- Python 2/3 compat for _thread by using 'future'
- Bump version to 2.3.0
Change-Id: I53b596d374a944bfb80d0b112f21bcc1f8bcee6e
diff --git a/test/unit/common/test_event_bus.py b/test/unit/common/test_event_bus.py
index be325e8..c833bf0 100644
--- a/test/unit/common/test_event_bus.py
+++ b/test/unit/common/test_event_bus.py
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
import re
from mock import Mock
@@ -21,6 +22,7 @@
from twisted.trial.unittest import TestCase
from pyvoltha.common.event_bus import EventBusClient, EventBus
+from six.moves import range
class TestEventBus(TestCase):
@@ -187,11 +189,11 @@
ebc.subscribe('', lambda _, msg: queue.put(msg))
- for i in xrange(10):
+ for i in range(10):
ebc.publish('', i)
self.assertEqual(len(queue.pending), 10)
- for i in xrange(10):
+ for i in range(10):
msg = yield queue.get()
self.assertEqual(msg, i)
self.assertEqual(len(queue.pending), 0)
diff --git a/test/unit/common/utils/test_bpf.py b/test/unit/common/utils/test_bpf.py
index 21a80da..6cb2a00 100644
--- a/test/unit/common/utils/test_bpf.py
+++ b/test/unit/common/utils/test_bpf.py
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import absolute_import
from unittest import TestCase, main
from scapy.layers.l2 import Ether, Dot1Q
@@ -25,8 +26,8 @@
pcp = 7
frame_match = 'ether[14:2] = 0x{:01x}{:03x}'.format(pcp << 1, vid)
filter = BpfProgramFilter(frame_match)
- self.assertTrue(filter(str(Ether()/Dot1Q(prio=pcp, vlan=vid))))
- self.assertFalse(filter(str(Ether()/Dot1Q(prio=pcp, vlan=4000))))
+ self.assertTrue(filter(bytes(Ether()/Dot1Q(prio=pcp, vlan=vid))))
+ self.assertFalse(filter(bytes(Ether()/Dot1Q(prio=pcp, vlan=4000))))
def test_bpf2(self):
vid1 = 4090
@@ -39,9 +40,9 @@
filter = BpfProgramFilter('{} or {}'.format(
frame_match_case1, frame_match_case2))
- self.assertTrue(filter(str(Ether()/Dot1Q(prio=pcp1, vlan=vid1))))
- self.assertTrue(filter(str(Ether()/Dot1Q(vlan=vid2))))
- self.assertFalse(filter(str(Ether()/Dot1Q(vlan=4001))))
+ self.assertTrue(filter(bytes(Ether()/Dot1Q(prio=pcp1, vlan=vid1))))
+ self.assertTrue(filter(bytes(Ether()/Dot1Q(vlan=vid2))))
+ self.assertFalse(filter(bytes(Ether()/Dot1Q(vlan=4001))))
if __name__ == '__main__':
diff --git a/test/unit/common/utils/test_indexpool.py b/test/unit/common/utils/test_indexpool.py
index 7eb1050..eb6ea50 100644
--- a/test/unit/common/utils/test_indexpool.py
+++ b/test/unit/common/utils/test_indexpool.py
@@ -11,8 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import absolute_import
from unittest import TestCase, main
from pyvoltha.common.utils.indexpool import IndexPool
+from six.moves import range
class TestIndexPool(TestCase):
pool = IndexPool(8, 0)
diff --git a/test/unit/common/utils/test_ordered_weakvalue_dict.py b/test/unit/common/utils/test_ordered_weakvalue_dict.py
deleted file mode 100644
index a8ce47c..0000000
--- a/test/unit/common/utils/test_ordered_weakvalue_dict.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-from unittest import TestCase, main
-
-from pyvoltha.common.utils.ordered_weakvalue_dict import OrderedWeakValueDict
-
-
-class O(object):
- def __init__(self, a):
- self.a = a
-
-
-class TestOrderedWeakValueDict(TestCase):
-
- def test_standard_behavior(self):
- holder = dict() # a real dict so we can control which object real ref
- def mk(k):
- o = O(k)
- holder[k] = o
- return o
- o = OrderedWeakValueDict((k, mk(k)) for k in xrange(10))
- self.assertEqual(len(o), 10)
- self.assertEqual(o[3].a, 3)
- o[3] = mk(-3)
- self.assertEqual(o[3].a, -3)
- del o[3]
- self.assertEqual(len(o), 9)
- o[100] = mk(100)
- self.assertEqual(len(o), 10)
- self.assertEqual(o.keys(), [0, 1, 2, 4, 5, 6, 7, 8, 9, 100])
-
- # remove a few items from the holder, they should be gone from o too
- del holder[1]
- del holder[5]
- del holder[6]
-
- self.assertEqual(o.keys(), [0, 2, 4, 7, 8, 9, 100])
- self.assertEqual([v.a for v in o.values()], [0, 2, 4, 7, 8, 9, 100])
-
-
diff --git a/test/unit/extensions/events/device_events/onu/test_onu_events.py b/test/unit/extensions/events/device_events/onu/test_onu_events.py
index b86aacc..f6c1e50 100644
--- a/test/unit/extensions/events/device_events/onu/test_onu_events.py
+++ b/test/unit/extensions/events/device_events/onu/test_onu_events.py
@@ -14,6 +14,7 @@
# limitations under the License.
#
+from __future__ import absolute_import
import arrow
from unittest import TestCase, main
from pyvoltha.adapters.kafka.core_proxy import CoreProxy
diff --git a/test/unit/extensions/omci/mock/__init__.py b/test/unit/extensions/omci/mock/__init__.py
index 2792694..133c6d8 100644
--- a/test/unit/extensions/omci/mock/__init__.py
+++ b/test/unit/extensions/omci/mock/__init__.py
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from nose.twistedtools import threaded_reactor, stop_reactor
diff --git a/test/unit/extensions/omci/mock/mock_adapter_agent.py b/test/unit/extensions/omci/mock/mock_adapter_agent.py
index ebe94e2..15bbd60 100644
--- a/test/unit/extensions/omci/mock/mock_adapter_agent.py
+++ b/test/unit/extensions/omci/mock/mock_adapter_agent.py
@@ -14,7 +14,9 @@
# limitations under the License.
#
# import binascii
+from __future__ import absolute_import
import structlog
+import six
# from twisted.internet.defer import Deferred
# from voltha.core.config.config_root import ConfigRoot
# from pyvoltha.protos.voltha_pb2 import VolthaInstance
@@ -85,7 +87,7 @@
def tearDown(self):
"""Test case cleanup"""
- for device in self._devices.itervalues():
+ for device in six.itervalues(self._devices):
device.tearDown()
self._devices.clear()
@@ -115,7 +117,7 @@
return None
# Get all child devices with the same parent ID
- children_ids = set(d.id for d in self._devices.itervalues()
+ children_ids = set(d.id for d in six.itervalues(self._devices)
if d.parent_id == parent_device_id)
# Loop through all the child devices with this parent ID
diff --git a/test/unit/extensions/omci/mock/mock_olt_handler.py b/test/unit/extensions/omci/mock/mock_olt_handler.py
index 142dbd8..9a51082 100644
--- a/test/unit/extensions/omci/mock/mock_olt_handler.py
+++ b/test/unit/extensions/omci/mock/mock_olt_handler.py
@@ -14,9 +14,11 @@
# limitations under the License.
#
+from __future__ import absolute_import
import sys
-from mock_adapter_agent import MockDevice
+from .mock_adapter_agent import MockDevice
from nose.twistedtools import reactor
+from six.moves import range
class MockOltHandler(MockDevice):
@@ -45,7 +47,7 @@
self.enabled = True # OLT is enabled/active
self.activated_onus = set() # Activated ONU serial numbers
- self.enabled_pons = range(0, 16) # Enabled PONs
+ self.enabled_pons = list(range(0, 16)) # Enabled PONs
self.max_tx = sys.maxint # Fail after this many tx requests
self.latency = 0.0 # OMCI response latency (keep small)
@@ -101,7 +103,7 @@
def _deliver_proxy_message(self, proxy_address, response):
from common.frameio.frameio import hexify
self._adapter_agent.receive_proxied_message(proxy_address,
- hexify(str(response)))
+ hexify(response))
def receive_proxied_message(self, _, __):
assert False, 'This is never called on the OLT side of proxy messaging'
diff --git a/test/unit/extensions/omci/mock/mock_onu.py b/test/unit/extensions/omci/mock/mock_onu.py
index e63c5cd..7102519 100644
--- a/test/unit/extensions/omci/mock/mock_onu.py
+++ b/test/unit/extensions/omci/mock/mock_onu.py
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from pyvoltha.adapters.extensions.omci.omci_frame import OmciFrame
from pyvoltha.adapters.extensions.omci.omci_defs import *
from pyvoltha.adapters.extensions.omci.omci_entities import *
diff --git a/test/unit/extensions/omci/mock/mock_onu_handler.py b/test/unit/extensions/omci/mock/mock_onu_handler.py
index 9ebe1f6..cbb814a 100644
--- a/test/unit/extensions/omci/mock/mock_onu_handler.py
+++ b/test/unit/extensions/omci/mock/mock_onu_handler.py
@@ -14,7 +14,8 @@
# limitations under the License.
#
-from mock_adapter_agent import MockProxyAddress, MockDevice
+from __future__ import absolute_import
+from .mock_adapter_agent import MockProxyAddress, MockDevice
from pyvoltha.adapters.extensions.omci.omci_cc import *
from pyvoltha.adapters.extensions.omci.omci_entities import entity_id_to_class_map
diff --git a/test/unit/extensions/omci/mock/mock_task.py b/test/unit/extensions/omci/mock/mock_task.py
index aad0c60..7bafc17 100644
--- a/test/unit/extensions/omci/mock/mock_task.py
+++ b/test/unit/extensions/omci/mock/mock_task.py
@@ -13,9 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from pyvoltha.adapters.extensions.omci.tasks.task import Task
from pyvoltha.common.utils.asleep import asleep
-from twisted.internet.defer import inlineCallbacks, failure
+from twisted.internet.defer import inlineCallbacks, failure, AlreadyCalledError, CancelledError
from twisted.internet import reactor
@@ -87,8 +88,10 @@
if self._success:
self.deferred.callback(self._value)
+ else:
+ self.deferred.errback(failure.Failure(self._value))
- self.deferred.errback(failure.Failure(self._value))
-
+ except AlreadyCalledError as all:
+ pass
except Exception as e:
self.deferred.errback(failure.Failure(e))
diff --git a/test/unit/extensions/omci/test_image_agent.py b/test/unit/extensions/omci/test_image_agent.py
index 0e500cb..a889be7 100644
--- a/test/unit/extensions/omci/test_image_agent.py
+++ b/test/unit/extensions/omci/test_image_agent.py
@@ -14,6 +14,7 @@
# limitations under the License.
#
+from __future__ import absolute_import
import binascii
import structlog
from unittest import TestCase, TestSuite, skip
@@ -52,9 +53,9 @@
'trailer' : '00000028',
'mic' : '00000000'
}
-
+
# sw_dwld_resp = '0001330A000700000000001f010000'
-
+
### Test Functions ###
def sim_receive_start_sw_download_resp(self, tid, eid, r=0):
msg = OmciFrame(
@@ -120,7 +121,7 @@
result = r
))
self.device.omci_cc.receive_message(msg)
-
+
def cb_after_send_omci(self, msg):
self.log.debug("cb_after_send_omci")
dmsg = OmciFrame(binascii.unhexlify(msg))
@@ -148,7 +149,7 @@
self.log.debug("receive download section, not respond")
elif mid == OmciDownloadSectionLast.message_id:
self.log.debug("response download last section")
- self.reactor.callLater(0, self.sim_receive_download_section_resp, tid, eid,
+ self.reactor.callLater(0, self.sim_receive_download_section_resp, tid, eid,
section=dmsg_body.fields["section_number"])
elif mid == OmciActivateImage.message_id:
self.log.debug("response activate image")
@@ -163,11 +164,11 @@
self.reactor.callLater(0, self.sim_receive_commit_image_resp, tid, eid)
else:
self.log.debug("Unsupported message type", message_type=mid)
-
+
self.defer = Deferred()
self.defer.addCallback(self.cb_after_send_omci)
self.adapter_agent.send_omci_defer = self.defer
-
+
def setUp(self):
self.log = structlog.get_logger()
self.log.debug("do setup")
@@ -196,7 +197,7 @@
self.omci_agent.database.add('1')
self.omci_agent.database.set('1', SoftwareImage.class_id, 0, {"is_committed": 1, "is_active": 1, "is_valid": 1})
self.omci_agent.database.set('1', SoftwareImage.class_id, 1, {"is_committed": 0, "is_active": 0, "is_valid": 1})
-
+
def tearDown(self):
self.log.debug("Test is Done")
self.omci_agent.database.remove('1')
@@ -214,10 +215,10 @@
return m + kargs['trailer'] + kargs['mic']
def sim_receive_sw_download_resp2(self):
- r = self.get_omci_msg(self.sw_dwld_resp['tid'], self.sw_dwld_resp['mid'],
- self.sw_dwld_resp['did'], self.sw_dwld_resp['entity_class'],
- self.sw_dwld_resp['entity_id'], self.sw_dwld_resp['reason'],
- self.sw_dwld_resp['window_size'], self.sw_dwld_resp['inst_num'], self.sw_dwld_resp['inst_id'],
+ r = self.get_omci_msg(self.sw_dwld_resp['tid'], self.sw_dwld_resp['mid'],
+ self.sw_dwld_resp['did'], self.sw_dwld_resp['entity_class'],
+ self.sw_dwld_resp['entity_id'], self.sw_dwld_resp['reason'],
+ self.sw_dwld_resp['window_size'], self.sw_dwld_resp['inst_num'], self.sw_dwld_resp['inst_id'],
trailer=self.sw_dwld_resp['trailer'], mic=self.sw_dwld_resp['mic'])
data = binascii.unhexlify(r)
#msg = OmciFrame(data)
@@ -228,22 +229,22 @@
def sw_action_success(self, instance_id, device_id):
self.log.debug("Action Success", device_id=device_id, entity_id=instance_id)
self.reactor.callLater(0, self.onu_do_activate)
-
+
def sw_action2_success(self, instance_id, device_id):
self.log.debug("Action2 Success", device_id=device_id, entity_id=instance_id)
def sw_action_fail(self, fail, device_id):
self.log.debug("Finally Failed", device_id=device_id)
self.log.debug(fail)
-
+
# def test_onu_do_activate(self):
def onu_do_activate(self):
- self.log.debug("do test_onu_do_activate")
+ self.log.debug("do test_onu_do_activate")
self.defer = self.device.do_onu_image_activate(self._image_dnld.name)
self.defer.addCallbacks(self.sw_action2_success, self.sw_action_fail, callbackArgs=(self.device_id,), errbackArgs=(self.device_id,))
self.reactor.callLater(100, self.stop)
# self.reactor.run()
-
+
@skip("for Jenkins Verification")
def test_onu_do_software_upgrade(self):
self.log.debug("do test_onu_do_software_upgrade", download=self._image_dnld)
@@ -254,14 +255,14 @@
# self.reactor.callLater(1, self.sim_receive_start_sw_download_resp)
# self.reactor.callLater(12, self.stop)
self.reactor.run()
-
+
@skip("Not used")
def test_omci_message(self):
- self.log.debug("do test_omci_message")
- r = self.get_omci_msg(self.sw_dwld_resp['tid'], self.sw_dwld_resp['mid'],
- self.sw_dwld_resp['did'], self.sw_dwld_resp['entity_class'],
- self.sw_dwld_resp['entity_id'], self.sw_dwld_resp['reason'],
- self.sw_dwld_resp['window_size'], self.sw_dwld_resp['inst_num'], self.sw_dwld_resp['inst_id'],
+ self.log.debug("do test_omci_message")
+ r = self.get_omci_msg(self.sw_dwld_resp['tid'], self.sw_dwld_resp['mid'],
+ self.sw_dwld_resp['did'], self.sw_dwld_resp['entity_class'],
+ self.sw_dwld_resp['entity_id'], self.sw_dwld_resp['reason'],
+ self.sw_dwld_resp['window_size'], self.sw_dwld_resp['inst_num'], self.sw_dwld_resp['inst_id'],
trailer=self.sw_dwld_resp['trailer'], mic=self.sw_dwld_resp['mic'])
data = binascii.unhexlify(r)
msg = OmciFrame(data)
@@ -273,7 +274,7 @@
@skip("Not used")
def test_omci_message2(self):
- self.log.debug("do test_omci_message2")
+ self.log.debug("do test_omci_message2")
msg = OmciFrame(
transaction_id=0x0001,
message_type=OmciStartSoftwareDownloadResponse.message_id,
@@ -287,7 +288,7 @@
)
)
self.log.debug(binascii.hexlify(str(msg)))
-
+
this_suite = TestSuite()
# this_suite.addTest(TestOmciDownload('test_onu_do_software_upgrade'))
# this_suite.addTest(TestOmciDownload('test_onu_do_activate'))
diff --git a/test/unit/extensions/omci/test_me_frame.py b/test/unit/extensions/omci/test_me_frame.py
index 74e2b78..89047dc 100644
--- a/test/unit/extensions/omci/test_me_frame.py
+++ b/test/unit/extensions/omci/test_me_frame.py
@@ -13,23 +13,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import TestCase, main
from nose.tools import assert_raises
from pyvoltha.adapters.extensions.omci.me_frame import *
from pyvoltha.adapters.extensions.omci.omci_me import *
from pyvoltha.adapters.extensions.omci.omci import *
+import codecs
-def hexify(buffer):
+def hexify(frame):
"""Return a hexadecimal string encoding of input buffer"""
- return ''.join('%02x' % ord(c) for c in buffer)
-
+ return codecs.encode(bytes(frame),'hex')
class TestSelectMeFrameGeneration(TestCase):
def assertGeneratedFrameEquals(self, frame, ref):
assert isinstance(frame, Packet)
- serialized_hexified_frame = hexify(str(frame)).upper()
+ serialized_hexified_frame = hexify(frame).upper()
ref = ref.upper()
if serialized_hexified_frame != ref:
self.fail('Mismatch:\nReference:\n{}\nGenerated (bad):\n{}'.format(
@@ -37,46 +38,46 @@
))
def test_mib_reset_message_serialization(self):
- ref = '00004F0A000200000000000000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'00004F0A000200000000000000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OntDataFrame().mib_reset()
self.assertGeneratedFrameEquals(frame, ref)
def test_create_gal_ethernet_profile(self):
- ref = '0000440A011000010030000000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A011000010030000000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = GalEthernetProfileFrame(1, max_gem_payload_size=48).create()
self.assertGeneratedFrameEquals(frame, ref)
def test_set_tcont_1(self):
- ref = '0000480A010680008000040000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000480A010680008000040000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = TcontFrame(0x8000, alloc_id=0x400).set()
self.assertGeneratedFrameEquals(frame, ref)
def test_set_tcont_2(self):
- ref = '0000480A010680018000040100000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000480A010680018000040100000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = TcontFrame(0x8001, alloc_id=0x401).set()
self.assertGeneratedFrameEquals(frame, ref)
def test_create_8021p_mapper_service_profile(self):
- ref = '0000440A00828000ffffffffffffffff' \
- 'ffffffffffffffffffff000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A00828000ffffffffffffffff' \
+ b'ffffffffffffffffffff000000000000' \
+ b'000000000000000000000028'
frame = Ieee8021pMapperServiceProfileFrame(0x8000).create()
self.assertGeneratedFrameEquals(frame, ref)
def test_create_mac_bridge_service_profile(self):
- ref = '0000440A002D02010001008000140002' \
- '000f0001000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A002D02010001008000140002' \
+ b'000f0001000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
spanning_tree_ind=False,
learning_ind=True,
@@ -90,9 +91,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_gem_port_network_ctp(self):
- ref = '0000440A010C01000400800003010000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A010C01000400800003010000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
port_id=0x400,
@@ -111,9 +112,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_gem_inteworking_tp(self):
- ref = '0000440A010A80010100058000000000' \
- '01000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A010A80010100058000000000' \
+ b'01000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = GemInterworkingTpFrame(0x8001,
gem_port_network_ctp_pointer=0x100,
interworking_option=5,
@@ -124,9 +125,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_8021p_mapper_service_profile(self):
- ref = '0000480A008280007F80800100000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000480A008280007F80800100000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
ptrs = [0x8001, 0, 0, 0, 0, 0, 0, 0]
frame = Ieee8021pMapperServiceProfileFrame(0x8000,
interwork_tp_pointers=ptrs).set()
@@ -140,9 +141,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_mac_bridge_port_configuration_data(self):
- ref = '0000440A002F21010201020380000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A002F21010201020380000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = MacBridgePortConfigurationDataFrame(0x2101,
bridge_id_pointer=0x201,
@@ -152,18 +153,18 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_vlan_tagging_filter_data(self):
- ref = '0000440A005421010400000000000000' \
- '00000000000000000000000000000000' \
- '100100000000000000000028'
+ ref = b'0000440A005421010400000000000000' \
+ b'00000000000000000000000000000000' \
+ b'100100000000000000000028'
frame = VlanTaggingFilterDataFrame(0x2101,
vlan_tcis=[0x400],
forward_operation=0x10).create()
self.assertGeneratedFrameEquals(frame, ref)
def test_create_extended_vlan_tagging_operation_configuration_data(self):
- ref = '0000440A00AB02020A04010000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A00AB02020A04010000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
association_type=10,
associated_me_pointer=0x401
@@ -176,9 +177,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_extended_vlan_tagging_operation_configuration_data(self):
- ref = '0000480A00AB02023800810081000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000480A00AB02023800810081000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
input_tpid=0x8100,
output_tpid=0x8100,
@@ -192,9 +193,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_extended_vlan_tagging_1(self):
- ref = '0000480A00AB02020400f00000008200' \
- '5000402f000000082004000000000000' \
- '000000000000000000000028'
+ ref = b'0000480A00AB02020400f00000008200' \
+ b'5000402f000000082004000000000000' \
+ b'000000000000000000000028'
data = dict(
received_frame_vlan_tagging_operation_table=\
VlanTaggingOperation(
@@ -219,9 +220,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_extended_vlan_tagging_2(self):
- ref = '0000480A00AB02020400F00000008200' \
- 'd000402f00000008200c000000000000' \
- '000000000000000000000028'
+ ref = b'0000480A00AB02020400F00000008200' \
+ b'd000402f00000008200c000000000000' \
+ b'000000000000000000000028'
data = dict(
received_frame_vlan_tagging_operation_table=
VlanTaggingOperation(
@@ -247,9 +248,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_mac_bridge_port_configuration_data2(self):
- ref = '0000440A002F02010201010b04010000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000440A002F02010201010b04010000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
bridge_id_pointer=0x201,
encapsulation_methods=0,
@@ -268,9 +269,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_pptp_ethernet_uni_frame(self):
- ref = '0000480A000B020109000005EE000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0000480A000B020109000005EE000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
administrative_state=0, # 0 - Unlock
max_frame_size=1518 # two-octet field
diff --git a/test/unit/extensions/omci/test_mib_db_dict.py b/test/unit/extensions/omci/test_mib_db_dict.py
index 2f7f26d..6cf1e1d 100644
--- a/test/unit/extensions/omci/test_mib_db_dict.py
+++ b/test/unit/extensions/omci/test_mib_db_dict.py
@@ -13,15 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import main, TestCase
from pyvoltha.adapters.extensions.omci.omci_entities import *
from pyvoltha.adapters.extensions.omci.database.mib_db_dict import *
from pyvoltha.adapters.extensions.omci.database.mib_db_api import MODIFIED_KEY, CREATED_KEY,\
DEVICE_ID_KEY, MDS_KEY, LAST_SYNC_KEY
-from mock.mock_adapter_agent import MockAdapterAgent, MockDevice
+from .mock.mock_adapter_agent import MockAdapterAgent, MockDevice
from nose.tools import raises, assert_raises
import time
+import six
_DEVICE_ID = 'br-549'
@@ -373,7 +375,7 @@
self.assertLessEqual(dev_data[CREATED_KEY], set_time)
self.assertLessEqual(self.db.created, set_time)
- self.assertFalse(any(isinstance(cls, int) for cls in dev_data.iterkeys()))
+ self.assertFalse(any(isinstance(cls, int) for cls in six.iterkeys(dev_data)))
def test_str_field_serialization(self):
self.db.start()
@@ -385,8 +387,8 @@
'olt_vendor_id': 'ABCD', # StrFixedLenField(4)
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
- self.assertTrue(all(isinstance(data[k], basestring) for k in attributes.keys()))
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
+ self.assertTrue(all(isinstance(data[k], six.string_types) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
def test_mac_address_ip_field_serialization(self):
@@ -400,8 +402,8 @@
'ip_address': '1.2.3.4', # IPField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
- self.assertTrue(all(isinstance(data[k], basestring) for k in attributes.keys()))
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
+ self.assertTrue(all(isinstance(data[k], six.string_types) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
def test_byte_and_short_field_serialization(self):
@@ -415,7 +417,7 @@
'non_omci_management_identifier': int(12345) # IPField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -429,7 +431,7 @@
'related_port': int(1234567) # IntField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -443,7 +445,7 @@
'packet_drop_queue_thresholds': int(0x1234) # LongField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -454,10 +456,10 @@
class_id = OntG.class_id
inst_id = 0
attributes = {
- 'extended_tc_layer_options': long(0x1234), # BitField(16)
+ 'extended_tc_layer_options': int(0x1234), # BitField(16)
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -476,7 +478,7 @@
'number_of_entries': 1
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -504,7 +506,7 @@
)
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
table_as_dict = json.loads(table_data.to_json())
self.assertTrue(all(isinstance(data['received_frame_vlan_tagging_operation_table'][0].fields[k],
diff --git a/test/unit/extensions/omci/test_mib_db_ext.py b/test/unit/extensions/omci/test_mib_db_ext.py
index 925e81f..e1ad39b 100644
--- a/test/unit/extensions/omci/test_mib_db_ext.py
+++ b/test/unit/extensions/omci/test_mib_db_ext.py
@@ -13,15 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import main, TestCase
from pyvoltha.adapters.extensions.omci.database.mib_db_ext import *
from pyvoltha.adapters.extensions.omci.database.mib_db_api import MODIFIED_KEY, CREATED_KEY,\
DEVICE_ID_KEY, MDS_KEY, LAST_SYNC_KEY
from pyvoltha.adapters.extensions.omci.omci_cc import UNKNOWN_CLASS_ATTRIBUTE_KEY
-from mock.mock_adapter_agent import MockAdapterAgent, MockDevice
+from .mock.mock_adapter_agent import MockAdapterAgent, MockDevice
from nose.tools import raises, assert_raises
import time
+import six
_DEVICE_ID = 'br-549'
@@ -372,7 +374,7 @@
self.assertLessEqual(dev_data[CREATED_KEY], set_time)
self.assertLessEqual(self.db.created, set_time)
- self.assertFalse(any(isinstance(cls, int) for cls in dev_data.iterkeys()))
+ self.assertFalse(any(isinstance(cls, int) for cls in six.iterkeys(dev_data)))
def test_str_field_serialization(self):
self.db.start()
@@ -384,8 +386,8 @@
'olt_vendor_id': 'ABCD', # StrFixedLenField(4)
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
- self.assertTrue(all(isinstance(data[k], basestring) for k in attributes.keys()))
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
+ self.assertTrue(all(isinstance(data[k], six.string_types) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
def test_mac_address_ip_field_serialization(self):
@@ -399,8 +401,8 @@
'ip_address': '1.2.3.4', # IPField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
- self.assertTrue(all(isinstance(data[k], basestring) for k in attributes.keys()))
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
+ self.assertTrue(all(isinstance(data[k], six.string_types) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
def test_byte_and_short_field_serialization(self):
@@ -414,7 +416,7 @@
'non_omci_management_identifier': int(12345) # IPField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -428,7 +430,7 @@
'related_port': int(1234567) # IntField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -442,7 +444,7 @@
'packet_drop_queue_thresholds': int(0x1234) # LongField
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -453,10 +455,10 @@
class_id = OntG.class_id
inst_id = 0
attributes = {
- 'extended_tc_layer_options': long(0x1234), # BitField(16)
+ 'extended_tc_layer_options': int(0x1234), # BitField(16)
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -475,7 +477,7 @@
'number_of_entries': 1
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
self.assertTrue(all(isinstance(data[k], type(attributes[k])) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
@@ -503,7 +505,7 @@
)
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
table_as_dict = json.loads(table_data.to_json())
self.assertTrue(all(isinstance(data['received_frame_vlan_tagging_operation_table'][0].fields[k],
@@ -527,9 +529,9 @@
}
self.db.set(_DEVICE_ID, class_id, inst_id, attributes)
- data = self.db.query(_DEVICE_ID, class_id, inst_id, attributes.keys())
- self.assertTrue(isinstance(UNKNOWN_CLASS_ATTRIBUTE_KEY, basestring))
- self.assertTrue(all(isinstance(attributes[k], basestring) for k in attributes.keys()))
+ data = self.db.query(_DEVICE_ID, class_id, inst_id, list(attributes.keys()))
+ self.assertTrue(isinstance(UNKNOWN_CLASS_ATTRIBUTE_KEY, six.string_types))
+ self.assertTrue(all(isinstance(attributes[k], six.string_types) for k in attributes.keys()))
self.assertTrue(all(data[k] == attributes[k] for k in attributes.keys()))
diff --git a/test/unit/extensions/omci/test_mib_resync_task.py b/test/unit/extensions/omci/test_mib_resync_task.py
index 892cd97..7294309 100644
--- a/test/unit/extensions/omci/test_mib_resync_task.py
+++ b/test/unit/extensions/omci/test_mib_resync_task.py
@@ -13,12 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import main, TestCase
from pyvoltha.adapters.extensions.omci.omci_entities import *
from pyvoltha.adapters.extensions.omci.tasks.mib_resync_task import MibResyncTask
from pyvoltha.adapters.extensions.omci.database.mib_db_dict import MibDbVolatileDict as OnuDB
from pyvoltha.adapters.extensions.omci.database.mib_db_ext import MibDbExternal as OltDB
-from mock.mock_adapter_agent import MockAdapterAgent, MockDevice
+from .mock.mock_adapter_agent import MockAdapterAgent, MockDevice
_DEVICE_ID = 'br-549'
@@ -145,7 +146,7 @@
class_id = OntG.class_id
inst_id = 0
attributes = {
- 'extended_tc_layer_options': long(0x1234), # BitField(16)
+ 'extended_tc_layer_options': int(0x1234), # BitField(16)
}
self.onu_db.set(_DEVICE_ID, class_id, inst_id, attributes)
self.olt_db.set(_DEVICE_ID, class_id, inst_id, attributes)
diff --git a/test/unit/extensions/omci/test_mib_sync.py b/test/unit/extensions/omci/test_mib_sync.py
index 10a1172..2a60a0b 100644
--- a/test/unit/extensions/omci/test_mib_sync.py
+++ b/test/unit/extensions/omci/test_mib_sync.py
@@ -14,8 +14,9 @@
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import TestCase, main
-from mock.mock_adapter_agent import MockAdapterAgent
+from .mock.mock_adapter_agent import MockAdapterAgent
diff --git a/test/unit/extensions/omci/test_mib_upload.py b/test/unit/extensions/omci/test_mib_upload.py
index c372819..90d16e3 100644
--- a/test/unit/extensions/omci/test_mib_upload.py
+++ b/test/unit/extensions/omci/test_mib_upload.py
@@ -14,8 +14,9 @@
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import TestCase, main
-from mock.mock_adapter_agent import MockAdapterAgent
+from .mock.mock_adapter_agent import MockAdapterAgent
class TestMibUpload(TestCase):
diff --git a/test/unit/extensions/omci/test_omci.py b/test/unit/extensions/omci/test_omci.py
index b6397a8..c33b796 100644
--- a/test/unit/extensions/omci/test_omci.py
+++ b/test/unit/extensions/omci/test_omci.py
@@ -13,15 +13,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
+from __future__ import print_function
from unittest import TestCase, main
from binascii import unhexlify
from pyvoltha.adapters.extensions.omci.omci import *
+from six.moves import range
+import codecs
-def hexify(buffer):
+def hexify(frame):
"""Return a hexadecimal string encoding of input buffer"""
- return ''.join('%02x' % ord(c) for c in buffer)
+ return codecs.encode(bytes(frame),'hex')
+
+
+def hex2raw(hex_string):
+ """ convert a string or bytes containing a hexadecimal as raw bytes"""
+ return codecs.decode(hex_string,'hex')
def chunk(indexable, chunk_size):
@@ -29,10 +38,6 @@
yield indexable[i:i + chunk_size]
-def hex2raw(hex_string):
- return ''.join(chr(int(byte, 16)) for byte in chunk(hex_string, 2))
-
-
class TestOmciFundamentals(TestCase):
def test_bitpos_from_mask(self):
@@ -63,31 +68,31 @@
def test_entity_attribute_serialization(self):
e = CircuitPack(vendor_id='F')
- self.assertEqual(e.serialize(), 'F\x00\x00\x00')
+ self.assertEqual(e.serialize(), b'F\x00\x00\x00')
e = CircuitPack(vendor_id='FOOX')
- self.assertEqual(e.serialize(), 'FOOX')
+ self.assertEqual(e.serialize(), b'FOOX')
e = CircuitPack(vendor_id='FOOX', number_of_ports=16)
- self.assertEqual(e.serialize(), '\x10FOOX')
+ self.assertEqual(e.serialize(), b'\x10FOOX')
def test_entity_attribute_serialization_mask_based(self):
e = CircuitPack(
number_of_ports=4,
- serial_number='BCMX31323334', # serial number is 4 ascii + 4 hex. 8 octets on the wire
- version='a1c12fba91de',
- vendor_id='BCM',
+ serial_number=b'BCMX31323334', # serial number is 4 ascii + 4 hex. 8 octets on the wire
+ version=b'a1c12fba91de',
+ vendor_id=b'BCM',
total_tcont_buffer_number=128
)
# Full object
self.assertEqual(e.serialize(),
- '\x04BCMX1234a1c12fba91de\x00\x00BCM\x00\x80')
+ b'\x04BCMX1234a1c12fba91de\x00\x00BCM\x00\x80')
# Explicit mask with valid values
- self.assertEqual(e.serialize(0x800), 'BCM\x00')
- self.assertEqual(e.serialize(0x6800), '\x04BCMX1234BCM\x00')
+ self.assertEqual(e.serialize(0x800), b'BCM\x00')
+ self.assertEqual(e.serialize(0x6800), b'\x04BCMX1234BCM\x00')
# Referring to an unfilled field is regarded as error
self.assertRaises(OmciUninitializedFieldError, e.serialize, 0xc00)
@@ -99,32 +104,32 @@
cls.mask_for('vendor_id', 'bridged_or_ip_ind'), 0x900)
reference_get_request_hex = (
- '00 00 49 0a'
- '00 06 01 01'
- '08 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 28'.replace(' ', '')
+ b'0000490a'
+ b'00060101'
+ b'08000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000028'
)
reference_get_request_raw = hex2raw(reference_get_request_hex)
reference_get_response_hex = (
- '00 00 29 0a'
- '00 06 01 01'
- '00 08 00 50'
- '4d 43 53 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 00'
- '00 00 00 28'.replace(' ', '')
+ b'0000290a'
+ b'00060101'
+ b'00080050'
+ b'4d435300'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000000'
+ b'00000028'
)
reference_get_response_raw = hex2raw(reference_get_response_hex)
@@ -139,7 +144,7 @@
attributes_mask=CircuitPack.mask_for('vendor_id')
)
)
- self.assertEqual(hexify(str(frame)), self.reference_get_request_hex)
+ self.assertEqual(hexify(frame), self.reference_get_request_hex)
def test_omci_frame_deserialization_no_data(self):
frame = OmciFrame(self.reference_get_request_raw)
@@ -170,7 +175,7 @@
def assertGeneratedFrameEquals(self, frame, ref):
assert isinstance(frame, Packet)
- serialized_hexified_frame = hexify(str(frame)).upper()
+ serialized_hexified_frame = hexify(frame).upper()
ref = ref.upper()
if serialized_hexified_frame != ref:
self.fail('Mismatch:\nReference:\n{}\nGenerated (bad):\n{}'.format(
@@ -178,9 +183,9 @@
))
def test_mib_reset_message_serialization(self):
- ref = '00014F0A000200000000000000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'00014F0A000200000000000000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=1,
message_type=OmciMibReset.message_id,
@@ -191,9 +196,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_gal_ethernet_profile(self):
- ref = '0002440A011000010030000000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0002440A011000010030000000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=2,
message_type=OmciCreate.message_id,
@@ -208,9 +213,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_tcont_1(self):
- ref = '0003480A010680008000040000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0003480A010680008000040000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
alloc_id=0x400
)
@@ -220,16 +225,16 @@
omci_message=OmciSet(
entity_class=Tcont.class_id,
entity_id=0x8000,
- attributes_mask=Tcont.mask_for(*data.keys()),
+ attributes_mask=Tcont.mask_for(*list(data.keys())),
data=data
)
)
self.assertGeneratedFrameEquals(frame, ref)
def test_set_tcont_2(self):
- ref = '0004480A010680018000040100000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0004480A010680018000040100000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
alloc_id=0x401
)
@@ -239,16 +244,16 @@
omci_message=OmciSet(
entity_class=Tcont.class_id,
entity_id=0x8001,
- attributes_mask=Tcont.mask_for(*data.keys()),
+ attributes_mask=Tcont.mask_for(*list(data.keys())),
data=data
)
)
self.assertGeneratedFrameEquals(frame, ref)
def test_create_8021p_mapper_service_profile(self):
- ref = '0007440A00828000ffffffffffffffff' \
- 'ffffffffffffffffffff000000000000' \
- '000000000000000000000028'
+ ref = b'0007440A00828000ffffffffffffffff' \
+ b'ffffffffffffffffffff000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=7,
message_type=OmciCreate.message_id,
@@ -264,9 +269,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_mac_bridge_service_profile(self):
- ref = '000B440A002D02010001008000140002' \
- '000f0001000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'000B440A002D02010001008000140002' \
+ b'000f0001000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=11,
message_type=OmciCreate.message_id,
@@ -287,9 +292,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_gem_port_network_ctp(self):
- ref = '000C440A010C01000400800003010000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'000C440A010C01000400800003010000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=12,
message_type=OmciCreate.message_id,
@@ -307,9 +312,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_multicast_gem_interworking_tp(self):
- ref = '0011440A011900060104000001000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0011440A011900060104000001000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=17,
message_type=OmciCreate.message_id,
@@ -326,9 +331,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_gem_inteworking_tp(self):
- ref = '0012440A010A80010100058000000000' \
- '01000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0012440A010A80010100058000000000' \
+ b'01000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=18,
message_type=OmciCreate.message_id,
@@ -347,9 +352,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_8021p_mapper_service_profile(self):
- ref = '0016480A008280004000800100000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0016480A008280004000800100000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
interwork_tp_pointer_for_p_bit_priority_0=0x8001
)
@@ -360,16 +365,16 @@
entity_class=Ieee8021pMapperServiceProfile.class_id,
entity_id=0x8000,
attributes_mask=Ieee8021pMapperServiceProfile.mask_for(
- *data.keys()),
+ *list(data.keys())),
data=data
)
)
self.assertGeneratedFrameEquals(frame, ref)
def test_create_mac_bridge_port_configuration_data(self):
- ref = '001A440A002F21010201020380000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'001A440A002F21010201020380000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=26,
message_type=OmciCreate.message_id,
@@ -387,9 +392,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_vlan_tagging_filter_data(self):
- ref = '001F440A005421010400000000000000' \
- '00000000000000000000000000000000' \
- '100100000000000000000028'
+ ref = b'001F440A005421010400000000000000' \
+ b'00000000000000000000000000000000' \
+ b'100100000000000000000028'
vlan_filter_list = [0] * 12
vlan_filter_list[0] = 0x0400
@@ -409,9 +414,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_create_extended_vlan_tagging_operation_configuration_data(self):
- ref = '0023440A00AB02020A04010000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0023440A00AB02020A04010000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=35,
message_type=OmciCreate.message_id,
@@ -428,9 +433,9 @@
self.assertGeneratedFrameEquals(frame, ref)
def test_set_extended_vlan_tagging_operation_configuration_data(self):
- ref = '0024480A00AB02023800810081000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0024480A00AB02023800810081000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
data = dict(
input_tpid=0x8100,
output_tpid=0x8100,
@@ -445,16 +450,16 @@
entity_id=0x202,
attributes_mask= \
ExtendedVlanTaggingOperationConfigurationData.mask_for(
- *data.keys()),
+ *list(data.keys())),
data=data
)
)
self.assertGeneratedFrameEquals(frame, ref)
def test_set_extended_vlan_tagging_1(self):
- ref = '0025480A00AB02020400f00000008200' \
- '5000402f000000082004000000000000' \
- '000000000000000000000028'
+ ref = b'0025480A00AB02020400f00000008200' \
+ b'5000402f000000082004000000000000' \
+ b'000000000000000000000028'
data = dict(
received_frame_vlan_tagging_operation_table=\
VlanTaggingOperation(
@@ -480,16 +485,16 @@
entity_id=0x202,
attributes_mask= \
ExtendedVlanTaggingOperationConfigurationData.mask_for(
- *data.keys()),
+ *list(data.keys())),
data=data
)
)
self.assertGeneratedFrameEquals(frame, ref)
def test_set_extended_vlan_tagging_2(self):
- ref = '0026480A00AB02020400F00000008200' \
- 'd000402f00000008200c000000000000' \
- '000000000000000000000028'
+ ref = b'0026480A00AB02020400F00000008200' \
+ b'd000402f00000008200c000000000000' \
+ b'000000000000000000000028'
data = dict(
received_frame_vlan_tagging_operation_table=
VlanTaggingOperation(
@@ -515,16 +520,16 @@
entity_id=0x202,
attributes_mask=
ExtendedVlanTaggingOperationConfigurationData.mask_for(
- *data.keys()),
+ *list(data.keys())),
data=data
)
)
self.assertGeneratedFrameEquals(frame, ref)
def test_create_mac_bridge_port_configuration_data2(self):
- ref = '0029440A002F02010201010b04010000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'0029440A002F02010201010b04010000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=41,
message_type=OmciCreate.message_id,
@@ -550,9 +555,9 @@
self.assertEqual(frame2, frame)
def test_mib_upload(self):
- ref = '00304D0A000200000000000000000000' \
- '00000000000000000000000000000000' \
- '000000000000000000000028'
+ ref = b'00304D0A000200000000000000000000' \
+ b'00000000000000000000000000000000' \
+ b'000000000000000000000028'
frame = OmciFrame(
transaction_id=48,
message_type=OmciMibUpload.message_id,
@@ -564,8 +569,8 @@
def test_parse_enh_security_avc(self):
refs = [
- "0000110a014c0000008000202020202020202020202020202020202020202020"
- "2020202020202020000000280be43cf4"
+ b"0000110a014c0000008000202020202020202020202020202020202020202020"
+ b"2020202020202020000000280be43cf4"
]
for i, data in enumerate(refs):
frame = OmciFrame(hex2raw(data))
@@ -574,8 +579,8 @@
def test_parse_alarm_message(self):
refs = [
- "0000100a00050101000000000000000000000000000000000000000000000000"
- "0000000220000000000000280be43cf4"
+ b"0000100a00050101000000000000000000000000000000000000000000000000"
+ b"0000000220000000000000280be43cf4"
]
for i, data in enumerate(refs):
frame = OmciFrame(hex2raw(data))
@@ -584,8 +589,8 @@
def test_parse_results(self):
refs = [
- "00001B0a014c0000008000202020202020202020202020202020202020202020"
- "2020202020202020000000280be43cf4"
+ b"00001B0a014c0000008000202020202020202020202020202020202020202020"
+ b"2020202020202020000000280be43cf4"
]
for i, data in enumerate(refs):
frame = OmciFrame(hex2raw(data))
@@ -594,543 +599,543 @@
def test_parsing_mib_upload_next_responses(self):
refs = [
- "00032e0a00020000000200008000000000000000000000000000000000000000"
- "00000000000000000000002828ce00e2",
- "00042e0a0002000000050101f0002f2f05202020202020202020202020202020"
- "202020202000000000000028d4eb4bdf",
- "00052e0a00020000000501010f80202020202020202020202020202020202020"
- "2020000000000000000000282dbe4b44",
- "00062e0a0002000000050104f000303001202020202020202020202020202020"
- "202020202000000000000028ef1b035b",
- "00072e0a00020000000501040f80202020202020202020202020202020202020"
- "202000000000000000000028fec29135",
- "00082e0a0002000000050180f000f8f801202020202020202020202020202020"
- "202020202000000000000028fd4e0b07",
- "00092e0a00020000000501800f80202020202020202020202020202020202020"
- "2020000000000000000000283306b3c0",
- "000a2e0a0002000000060101f0002f054252434d123456780000000000000000"
- "00000000000c000000000028585c2083",
- "000b2e0a00020000000601010f004252434d0000000000000000000000000000"
- "0000000000000000000000284f0e82b9",
- "000c2e0a000200000006010100f8202020202020202020202020202020202020"
- "202000000000000000000028e68bdb63",
- "000d2e0a00020000000601010004000000000000000000000000000000000000"
- "00000000000000000000002857bc2730",
- "000e2e0a0002000000060104f00030014252434d123456780000000000000000"
- "00000000000c000000000028afe656f5",
- "000f2e0a00020000000601040f004252434d0000000000000000000000000000"
- "000000000000000000000028f8f6db74",
- "00102e0a000200000006010400f8202020202020202020202020202020202020"
- "202000000800000000000028064fc177",
- "00112e0a00020000000601040004000000000000000000000000000000000000"
- "0000000000000000000000285a5c0841",
- "00122e0a0002000000060180f000f8014252434d123456780000000000000000"
- "00000000000c0000000000286826eafe",
- "00132e0a00020000000601800f004252434d0000000000000000000000000000"
- "0000000000000000000000281c4b7033",
- "00142e0a000200000006018000f8202020202020202020202020202020202020"
- "202000084040000000000028ac144eb3",
- "00152e0a00020000000601800004000000000000000000000000000000000000"
- "0000000000000000000000280a81a9a7",
- "00162e0a0002000000070000f0003530323247574f3236363230303301010100"
- "0000000000000000000000287ea42d51",
- "00172e0a0002000000070001f0003530323247574f3236363230303300000100"
- "000000000000000000000028b17f567f",
- "00182e0a0002000000830000c000202020202020202020202020202020202020"
- "2020202020200000000000280e7eebaa",
- "00192e0a00020000008300002000202020202020202020202020202000000000"
- "000000000000000000000028a95c03b3",
- "001a2e0a00020000008300001000000000000000000000000000000000000000"
- "000000000000000000000028f30515a1",
- "001b2e0a0002000000850000ffe0000000000000000000000000000000000000"
- "000000000000000000000028764c18de",
- "001c2e0a0002000000860001c00000001018aaaa000000000000000000000000"
- "000000000000000000000028ea220ce0",
- "001d2e0a00020000008600012000000000000000000000000000000000000000"
- "000000000000000000000028fbdb571a",
- "001e2e0a00020000008600011f80000000000000000000000000000000000000"
- "000000000000000000000028c2682282",
- "001f2e0a00020000008600010078000000000000000000000000000000000000"
- "0000000000000000000000289c4809b1",
- "00202e0a00020000008600010004000000000000000000000000000000000000"
- "000000000000000000000028d174a7d6",
- "00212e0a00020000008600010002000000000000000000000000000000000000"
- "0000000000000000000000288f353976",
- "00222e0a0002000001000000e0004252434d0000000000000000000000000000"
- "4252434d123456780000002803bbceb6",
- "00232e0a00020000010000001f80000000000000000000000000000000000000"
- "0000000000000000000000281b9674db",
- "00242e0a00020000010000000040000000000000000000000000000000000000"
- "000000000000000000000028b1050b9b",
- "00252e0a00020000010000000038000000000000000000000000000003000000"
- "0000000000000000000000288266645e",
- "00262e0a0002000001010000f80042564d344b3030425241303931352d303038"
- "3300b3000001010000000028837d624f",
- "00272e0a000200000101000007f8000000010020027c85630016000030000000"
- "00000000000000000000002896c707e1",
- "00282e0a0002000001068000e00000ff01010000000000000000000000000000"
- "00000000000000000000002811acb324",
- "00292e0a0002000001068001e00000ff01010000000000000000000000000000"
- "00000000000000000000002823ad6aa9",
- "002a2e0a0002000001068002e00000ff01010000000000000000000000000000"
- "000000000000000000000028a290efd9",
- "002b2e0a0002000001068003e00000ff01010000000000000000000000000000"
- "000000000000000000000028af893357",
- "002c2e0a0002000001068004e00000ff01010000000000000000000000000000"
- "000000000000000000000028901141a3",
- "002d2e0a0002000001068005e00000ff01010000000000000000000000000000"
- "000000000000000000000028c4398bcc",
- "002e2e0a0002000001068006e00000ff01010000000000000000000000000000"
- "000000000000000000000028e60acd99",
- "002f2e0a0002000001068007e00000ff01010000000000000000000000000000"
- "0000000000000000000000284b5faf23",
- "00302e0a0002000001078001ffff01000800300000050900000000ffff000000"
- "008181000000000000000028bef89455",
- "00312e0a0002000001080401f000000000000401000000000000000000000000"
- "0000000000000000000000287dc5183d",
- "00322e0a0002000001150401fff0000080008000000000040100000000010000"
- "000000000000000000000028cc0a46a9",
- "00332e0a0002000001150401000f0200020002000200ffff0900000000000000"
- "0000000000000000000000288c42acdd",
- "00342e0a0002000001150402fff0000080008000000000040100010000010000"
- "000000000000000000000028de9f625a",
- "00352e0a0002000001150402000f0200020002000200ffff0900000000000000"
- "0000000000000000000000280587860b",
- "00362e0a0002000001150403fff0000080008000000000040100020000010000"
- "000000000000000000000028a49cc820",
- "00372e0a0002000001150403000f0200020002000200ffff0900000000000000"
- "000000000000000000000028b4e4a2b9",
- "00382e0a0002000001150404fff0000080008000000000040100030000010000"
- "0000000000000000000000288233147b",
- "00392e0a0002000001150404000f0200020002000200ffff0900000000000000"
- "00000000000000000000002881b706b0",
- "003a2e0a0002000001150405fff0000080008000000000040100040000010000"
- "000000000000000000000028be8efc9f",
- "003b2e0a0002000001150405000f0200020002000200ffff0900000000000000"
- "000000000000000000000028d944804b",
- "003c2e0a0002000001150406fff0000080008000000000040100050000010000"
- "000000000000000000000028725c3864",
- "003d2e0a0002000001150406000f0200020002000200ffff0900000000000000"
- "0000000000000000000000284e2d5cd2",
- "003e2e0a0002000001150407fff0000080008000000000040100060000010000"
- "000000000000000000000028464b03ba",
- "003f2e0a0002000001150407000f0200020002000200ffff0900000000000000"
- "0000000000000000000000287006cfd0",
- "00402e0a0002000001150408fff0000080008000000000040100070000010000"
- "000000000000000000000028cd88ebeb",
- "00412e0a0002000001150408000f0200020002000200ffff0900000000000000"
- "0000000000000000000000285a5905e2",
- "00422e0a0002000001158000fff0000100010000000000800000000000010000"
- "000000000000000000000028e61b19d1",
- "00432e0a0002000001158000000f0200020002000200ffff0900000000000000"
- "000000000000000000000028b0cc5937",
- "00442e0a0002000001158001fff0000100010000000000800000010000010000"
- "0000000000000000000000285386bbf2",
- "00452e0a0002000001158001000f0200020002000200ffff0900000000000000"
- "000000000000000000000028c06723ab",
- "00462e0a0002000001158002fff0000100010000000000800000020000010000"
- "000000000000000000000028ab49704a",
- "00472e0a0002000001158002000f0200020002000200ffff0900000000000000"
- "00000000000000000000002857432f25",
- "00482e0a0002000001158003fff0000100010000000000800000030000010000"
- "000000000000000000000028b383c057",
- "00492e0a0002000001158003000f0200020002000200ffff0900000000000000"
- "000000000000000000000028dca40d66",
- "004a2e0a0002000001158004fff0000100010000000000800000040000010000"
- "0000000000000000000000286b7ba0e2",
- "004b2e0a0002000001158004000f0200020002000200ffff0900000000000000"
- "000000000000000000000028fd442363",
- "004c2e0a0002000001158005fff0000100010000000000800000050000010000"
- "0000000000000000000000280ee9a0b8",
- "004d2e0a0002000001158005000f0200020002000200ffff0900000000000000"
- "000000000000000000000028bc1b9843",
- "004e2e0a0002000001158006fff0000100010000000000800000060000010000"
- "0000000000000000000000280c535114",
- "004f2e0a0002000001158006000f0200020002000200ffff0900000000000000"
- "00000000000000000000002887032f2b",
- "00502e0a0002000001158007fff0000100010000000000800000070000010000"
- "000000000000000000000028a77d7f61",
- "00512e0a0002000001158007000f0200020002000200ffff0900000000000000"
- "00000000000000000000002835e9f567",
- "00522e0a0002000001158008fff0000100010000000000800100000000010000"
- "000000000000000000000028ff4ca94b",
- "00532e0a0002000001158008000f0200020002000200ffff0900000000000000"
- "0000000000000000000000281e2f1e33",
- "00542e0a0002000001158009fff0000100010000000000800100010000010000"
- "0000000000000000000000283c473db0",
- "00552e0a0002000001158009000f0200020002000200ffff0900000000000000"
- "00000000000000000000002869f51dda",
- "00562e0a000200000115800afff0000100010000000000800100020000010000"
- "000000000000000000000028046b8feb",
- "00572e0a000200000115800a000f0200020002000200ffff0900000000000000"
- "00000000000000000000002868b1495e",
- "00582e0a000200000115800bfff0000100010000000000800100030000010000"
- "0000000000000000000000282b927566",
- "00592e0a000200000115800b000f0200020002000200ffff0900000000000000"
- "000000000000000000000028cd43de96",
- "005a2e0a000200000115800cfff0000100010000000000800100040000010000"
- "000000000000000000000028c49617dd",
- "005b2e0a000200000115800c000f0200020002000200ffff0900000000000000"
- "000000000000000000000028fbbb972a",
- "005c2e0a000200000115800dfff0000100010000000000800100050000010000"
- "00000000000000000000002893d4c2b5",
- "005d2e0a000200000115800d000f0200020002000200ffff0900000000000000"
- "000000000000000000000028dc9d97ca",
- "005e2e0a000200000115800efff0000100010000000000800100060000010000"
- "0000000000000000000000280e1ec245",
- "005f2e0a000200000115800e000f0200020002000200ffff0900000000000000"
- "000000000000000000000028be3d56f1",
- "00602e0a000200000115800ffff0000100010000000000800100070000010000"
- "0000000000000000000000280c046099",
- "00612e0a000200000115800f000f0200020002000200ffff0900000000000000"
- "000000000000000000000028d770e4ea",
- "00622e0a0002000001158010fff0000100010000000000800200000000010000"
- "0000000000000000000000281b449092",
- "00632e0a0002000001158010000f0200020002000200ffff0900000000000000"
- "0000000000000000000000282b7a8604",
- "00642e0a0002000001158011fff0000100010000000000800200010000010000"
- "000000000000000000000028ad498068",
- "00652e0a0002000001158011000f0200020002000200ffff0900000000000000"
- "000000000000000000000028a114b304",
- "00662e0a0002000001158012fff0000100010000000000800200020000010000"
- "000000000000000000000028c091715d",
- "00672e0a0002000001158012000f0200020002000200ffff0900000000000000"
- "000000000000000000000028d4ab49e7",
- "00682e0a0002000001158013fff0000100010000000000800200030000010000"
- "000000000000000000000028e39dd5dd",
- "00692e0a0002000001158013000f0200020002000200ffff0900000000000000"
- "0000000000000000000000288779ebf0",
- "006a2e0a0002000001158014fff0000100010000000000800200040000010000"
- "000000000000000000000028c47a741f",
- "006b2e0a0002000001158014000f0200020002000200ffff0900000000000000"
- "000000000000000000000028ce765fcd",
- "006c2e0a0002000001158015fff0000100010000000000800200050000010000"
- "0000000000000000000000288f732591",
- "006d2e0a0002000001158015000f0200020002000200ffff0900000000000000"
- "000000000000000000000028920b6f5e",
- "006e2e0a0002000001158016fff0000100010000000000800200060000010000"
- "000000000000000000000028f072e1c3",
- "006f2e0a0002000001158016000f0200020002000200ffff0900000000000000"
- "000000000000000000000028b47ea00f",
- "00702e0a0002000001158017fff0000100010000000000800200070000010000"
- "00000000000000000000002813461627",
- "00712e0a0002000001158017000f0200020002000200ffff0900000000000000"
- "00000000000000000000002809013378",
- "00722e0a0002000001158018fff0000100010000000000800300000000010000"
- "0000000000000000000000286168e200",
- "00732e0a0002000001158018000f0200020002000200ffff0900000000000000"
- "000000000000000000000028eccc81f7",
- "00742e0a0002000001158019fff0000100010000000000800300010000010000"
- "00000000000000000000002855fe8072",
- "00752e0a0002000001158019000f0200020002000200ffff0900000000000000"
- "000000000000000000000028c159c496",
- "00762e0a000200000115801afff0000100010000000000800300020000010000"
- "00000000000000000000002872652aca",
- "00772e0a000200000115801a000f0200020002000200ffff0900000000000000"
- "0000000000000000000000283ba1c255",
- "00782e0a000200000115801bfff0000100010000000000800300030000010000"
- "0000000000000000000000286b2ecb95",
- "00792e0a000200000115801b000f0200020002000200ffff0900000000000000"
- "000000000000000000000028441fbe05",
- "007a2e0a000200000115801cfff0000100010000000000800300040000010000"
- "000000000000000000000028f07ad5d8",
- "007b2e0a000200000115801c000f0200020002000200ffff0900000000000000"
- "000000000000000000000028237d6a28",
- "007c2e0a000200000115801dfff0000100010000000000800300050000010000"
- "000000000000000000000028e47dfdca",
- "007d2e0a000200000115801d000f0200020002000200ffff0900000000000000"
- "0000000000000000000000280ca941be",
- "007e2e0a000200000115801efff0000100010000000000800300060000010000"
- "0000000000000000000000283a1ef4d4",
- "007f2e0a000200000115801e000f0200020002000200ffff0900000000000000"
- "0000000000000000000000289c905cd5",
- "00802e0a000200000115801ffff0000100010000000000800300070000010000"
- "000000000000000000000028384ae4c6",
- "00812e0a000200000115801f000f0200020002000200ffff0900000000000000"
- "000000000000000000000028be87eb55",
- "00822e0a0002000001158020fff0000100010000000000800400000000010000"
- "000000000000000000000028f0412282",
- "00832e0a0002000001158020000f0200020002000200ffff0900000000000000"
- "000000000000000000000028842ada0c",
- "00842e0a0002000001158021fff0000100010000000000800400010000010000"
- "000000000000000000000028a6eed1bc",
- "00852e0a0002000001158021000f0200020002000200ffff0900000000000000"
- "0000000000000000000000280f3dd903",
- "00862e0a0002000001158022fff0000100010000000000800400020000010000"
- "000000000000000000000028474a0823",
- "00872e0a0002000001158022000f0200020002000200ffff0900000000000000"
- "000000000000000000000028e00456b3",
- "00882e0a0002000001158023fff0000100010000000000800400030000010000"
- "00000000000000000000002851cbe1a6",
- "00892e0a0002000001158023000f0200020002000200ffff0900000000000000"
- "00000000000000000000002869a99563",
- "008a2e0a0002000001158024fff0000100010000000000800400040000010000"
- "00000000000000000000002867705534",
- "008b2e0a0002000001158024000f0200020002000200ffff0900000000000000"
- "0000000000000000000000286f9570c0",
- "008c2e0a0002000001158025fff0000100010000000000800400050000010000"
- "000000000000000000000028450ef70e",
- "008d2e0a0002000001158025000f0200020002000200ffff0900000000000000"
- "00000000000000000000002847588afa",
- "008e2e0a0002000001158026fff0000100010000000000800400060000010000"
- "000000000000000000000028c8218600",
- "008f2e0a0002000001158026000f0200020002000200ffff0900000000000000"
- "000000000000000000000028391a6ba7",
- "00902e0a0002000001158027fff0000100010000000000800400070000010000"
- "000000000000000000000028afc0878b",
- "00912e0a0002000001158027000f0200020002000200ffff0900000000000000"
- "00000000000000000000002819130d66",
- "00922e0a0002000001158028fff0000100010000000000800500000000010000"
- "0000000000000000000000289afa4cf7",
- "00932e0a0002000001158028000f0200020002000200ffff0900000000000000"
- "00000000000000000000002873a4e20b",
- "00942e0a0002000001158029fff0000100010000000000800500010000010000"
- "000000000000000000000028633debd9",
- "00952e0a0002000001158029000f0200020002000200ffff0900000000000000"
- "0000000000000000000000280397eb28",
- "00962e0a000200000115802afff0000100010000000000800500020000010000"
- "0000000000000000000000280ed5ee7a",
- "00972e0a000200000115802a000f0200020002000200ffff0900000000000000"
- "000000000000000000000028f886ba59",
- "00982e0a000200000115802bfff0000100010000000000800500030000010000"
- "00000000000000000000002888ff79b1",
- "00992e0a000200000115802b000f0200020002000200ffff0900000000000000"
- "00000000000000000000002846baf278",
- "009a2e0a000200000115802cfff0000100010000000000800500040000010000"
- "0000000000000000000000281fd1e68f",
- "009b2e0a000200000115802c000f0200020002000200ffff0900000000000000"
- "000000000000000000000028d99760f9",
- "009c2e0a000200000115802dfff0000100010000000000800500050000010000"
- "000000000000000000000028557aaf84",
- "009d2e0a000200000115802d000f0200020002000200ffff0900000000000000"
- "000000000000000000000028064210fd",
- "009e2e0a000200000115802efff0000100010000000000800500060000010000"
- "0000000000000000000000285fd6c061",
- "009f2e0a000200000115802e000f0200020002000200ffff0900000000000000"
- "000000000000000000000028299efbb5",
- "00a02e0a000200000115802ffff0000100010000000000800500070000010000"
- "00000000000000000000002834f127c4",
- "00a12e0a000200000115802f000f0200020002000200ffff0900000000000000"
- "000000000000000000000028edd30591",
- "00a22e0a0002000001158030fff0000100010000000000800600000000010000"
- "000000000000000000000028183183f2",
- "00a32e0a0002000001158030000f0200020002000200ffff0900000000000000"
- "000000000000000000000028a27e71f6",
- "00a42e0a0002000001158031fff0000100010000000000800600010000010000"
- "000000000000000000000028bd64dfc0",
- "00a52e0a0002000001158031000f0200020002000200ffff0900000000000000"
- "00000000000000000000002839e2f37e",
- "00a62e0a0002000001158032fff0000100010000000000800600020000010000"
- "0000000000000000000000283e72282e",
- "00a72e0a0002000001158032000f0200020002000200ffff0900000000000000"
- "000000000000000000000028cef19baa",
- "00a82e0a0002000001158033fff0000100010000000000800600030000010000"
- "0000000000000000000000281c1caf44",
- "00a92e0a0002000001158033000f0200020002000200ffff0900000000000000"
- "00000000000000000000002814712e27",
- "00aa2e0a0002000001158034fff0000100010000000000800600040000010000"
- "000000000000000000000028f02a30a4",
- "00ab2e0a0002000001158034000f0200020002000200ffff0900000000000000"
- "000000000000000000000028068fcbf5",
- "00ac2e0a0002000001158035fff0000100010000000000800600050000010000"
- "000000000000000000000028436bd783",
- "00ad2e0a0002000001158035000f0200020002000200ffff0900000000000000"
- "0000000000000000000000288da3200f",
- "00ae2e0a0002000001158036fff0000100010000000000800600060000010000"
- "000000000000000000000028c26a02ca",
- "00af2e0a0002000001158036000f0200020002000200ffff0900000000000000"
- "000000000000000000000028147a41ee",
- "00b02e0a0002000001158037fff0000100010000000000800600070000010000"
- "0000000000000000000000287c2bbec0",
- "00b12e0a0002000001158037000f0200020002000200ffff0900000000000000"
- "0000000000000000000000284c86c11f",
- "00b22e0a0002000001158038fff0000100010000000000800700000000010000"
- "00000000000000000000002895b94e06",
- "00b32e0a0002000001158038000f0200020002000200ffff0900000000000000"
- "000000000000000000000028a2b34012",
- "00b42e0a0002000001158039fff0000100010000000000800700010000010000"
- "00000000000000000000002804b205a3",
- "00b52e0a0002000001158039000f0200020002000200ffff0900000000000000"
- "00000000000000000000002886856d76",
- "00b62e0a000200000115803afff0000100010000000000800700020000010000"
- "0000000000000000000000282a22752c",
- "00b72e0a000200000115803a000f0200020002000200ffff0900000000000000"
- "000000000000000000000028488e67db",
- "00b82e0a000200000115803bfff0000100010000000000800700030000010000"
- "000000000000000000000028a55f79ea",
- "00b92e0a000200000115803b000f0200020002000200ffff0900000000000000"
- "00000000000000000000002842d77ba7",
- "00ba2e0a000200000115803cfff0000100010000000000800700040000010000"
- "000000000000000000000028da65268a",
- "00bb2e0a000200000115803c000f0200020002000200ffff0900000000000000"
- "000000000000000000000028c58443ec",
- "00bc2e0a000200000115803dfff0000100010000000000800700050000010000"
- "000000000000000000000028997aca59",
- "00bd2e0a000200000115803d000f0200020002000200ffff0900000000000000"
- "000000000000000000000028a2670b7d",
- "00be2e0a000200000115803efff0000100010000000000800700060000010000"
- "00000000000000000000002813e904cb",
- "00bf2e0a000200000115803e000f0200020002000200ffff0900000000000000"
- "000000000000000000000028c387a9e5",
- "00c02e0a000200000115803ffff0000100010000000000800700070000010000"
- "000000000000000000000028d556a6b2",
- "00c12e0a000200000115803f000f0200020002000200ffff0900000000000000"
- "00000000000000000000002868d9961a",
- "00c22e0a0002000001168000f000800000000200000000000000000000000000"
- "000000000000000000000028b69b53c1",
- "00c32e0a0002000001168001f000800000000200000000000000000000000000"
- "000000000000000000000028537705d4",
- "00c42e0a0002000001168002f000800000000200000000000000000000000000"
- "000000000000000000000028db171b7b",
- "00c52e0a0002000001168003f000800000000200000000000000000000000000"
- "000000000000000000000028f9b3fa54",
- "00c62e0a0002000001168004f000800000000200000000000000000000000000"
- "000000000000000000000028cdacda4e",
- "00c72e0a0002000001168005f000800000000200000000000000000000000000"
- "00000000000000000000002837133b6e",
- "00c82e0a0002000001168006f000800000000200000000000000000000000000"
- "000000000000000000000028d6447905",
- "00c92e0a0002000001168007f000800000000200000000000000000000000000"
- "000000000000000000000028021a3910",
- "00ca2e0a0002000001168008f000800100000200000000000000000000000000"
- "00000000000000000000002835d3cf43",
- "00cb2e0a0002000001168009f000800100000200000000000000000000000000"
- "00000000000000000000002887ad76fc",
- "00cc2e0a000200000116800af000800100000200000000000000000000000000"
- "00000000000000000000002895e3d838",
- "00cd2e0a000200000116800bf000800100000200000000000000000000000000"
- "000000000000000000000028a07489ac",
- "00ce2e0a000200000116800cf000800100000200000000000000000000000000"
- "0000000000000000000000285d08821d",
- "00cf2e0a000200000116800df000800100000200000000000000000000000000"
- "000000000000000000000028302249a4",
- "00d02e0a000200000116800ef000800100000200000000000000000000000000"
- "0000000000000000000000283966d3bc",
- "00d12e0a000200000116800ff000800100000200000000000000000000000000"
- "0000000000000000000000289519cdb5",
- "00d22e0a0002000001168010f000800200000200000000000000000000000000"
- "0000000000000000000000281bc99b7b",
- "00d32e0a0002000001168011f000800200000200000000000000000000000000"
- "000000000000000000000028e483b1a0",
- "00d42e0a0002000001168012f000800200000200000000000000000000000000"
- "0000000000000000000000286885d8bd",
- "00d52e0a0002000001168013f000800200000200000000000000000000000000"
- "000000000000000000000028cbe7afd8",
- "00d62e0a0002000001168014f000800200000200000000000000000000000000"
- "00000000000000000000002809009846",
- "00d72e0a0002000001168015f000800200000200000000000000000000000000"
- "0000000000000000000000285bee86c4",
- "00d82e0a0002000001168016f000800200000200000000000000000000000000"
- "0000000000000000000000281f25725c",
- "00d92e0a0002000001168017f000800200000200000000000000000000000000"
- "00000000000000000000002872e94fe1",
- "00da2e0a0002000001168018f000800300000200000000000000000000000000"
- "000000000000000000000028e39d572f",
- "00db2e0a0002000001168019f000800300000200000000000000000000000000"
- "0000000000000000000000281c9dcadd",
- "00dc2e0a000200000116801af000800300000200000000000000000000000000"
- "0000000000000000000000287c5b8405",
- "00dd2e0a000200000116801bf000800300000200000000000000000000000000"
- "00000000000000000000002826334420",
- "00de2e0a000200000116801cf000800300000200000000000000000000000000"
- "00000000000000000000002871ee1536",
- "00df2e0a000200000116801df000800300000200000000000000000000000000"
- "0000000000000000000000289dfeeeb9",
- "00e02e0a000200000116801ef000800300000200000000000000000000000000"
- "000000000000000000000028954d55b3",
- "00e12e0a000200000116801ff000800300000200000000000000000000000000"
- "000000000000000000000028930c564e",
- "00e22e0a0002000001168020f000800400000200000000000000000000000000"
- "000000000000000000000028b9cec3bf",
- "00e32e0a0002000001168021f000800400000200000000000000000000000000"
- "0000000000000000000000284263f268",
- "00e42e0a0002000001168022f000800400000200000000000000000000000000"
- "000000000000000000000028913e5219",
- "00e52e0a0002000001168023f000800400000200000000000000000000000000"
- "000000000000000000000028efe86fe1",
- "00e62e0a0002000001168024f000800400000200000000000000000000000000"
- "000000000000000000000028deb045df",
- "00e72e0a0002000001168025f000800400000200000000000000000000000000"
- "000000000000000000000028255bcd32",
- "00e82e0a0002000001168026f000800400000200000000000000000000000000"
- "000000000000000000000028355392ad",
- "00e92e0a0002000001168027f000800400000200000000000000000000000000"
- "000000000000000000000028404a6aca",
- "00ea2e0a0002000001168028f000800500000200000000000000000000000000"
- "0000000000000000000000281de78f94",
- "00eb2e0a0002000001168029f000800500000200000000000000000000000000"
- "000000000000000000000028501a3aae",
- "00ec2e0a000200000116802af000800500000200000000000000000000000000"
- "0000000000000000000000282947d976",
- "00ed2e0a000200000116802bf000800500000200000000000000000000000000"
- "000000000000000000000028095cfe0d",
- "00ee2e0a000200000116802cf000800500000200000000000000000000000000"
- "000000000000000000000028bbcfc27a",
- "00ef2e0a000200000116802df000800500000200000000000000000000000000"
- "000000000000000000000028dbb27396",
- "00f02e0a000200000116802ef000800500000200000000000000000000000000"
- "000000000000000000000028dbe9b225",
- "00f12e0a000200000116802ff000800500000200000000000000000000000000"
- "000000000000000000000028840c0b08",
- "00f22e0a0002000001168030f000800600000200000000000000000000000000"
- "0000000000000000000000287683e4f8",
- "00f32e0a0002000001168031f000800600000200000000000000000000000000"
- "00000000000000000000002844d131d1",
- "00f42e0a0002000001168032f000800600000200000000000000000000000000"
- "0000000000000000000000284d2c2c6d",
- "00f52e0a0002000001168033f000800600000200000000000000000000000000"
- "000000000000000000000028e89a166c",
- "00f62e0a0002000001168034f000800600000200000000000000000000000000"
- "0000000000000000000000280f47db8c",
- "00f72e0a0002000001168035f000800600000200000000000000000000000000"
- "0000000000000000000000283ede8b3e",
- "00f82e0a0002000001168036f000800600000200000000000000000000000000"
- "000000000000000000000028580547db",
- "00f92e0a0002000001168037f000800600000200000000000000000000000000"
- "000000000000000000000028d72a270e",
- "00fa2e0a0002000001168038f000800700000200000000000000000000000000"
- "000000000000000000000028c25ce712",
- "00fb2e0a0002000001168039f000800700000200000000000000000000000000"
- "000000000000000000000028b908637e",
- "00fc2e0a000200000116803af000800700000200000000000000000000000000"
- "0000000000000000000000285b66e6fa",
- "00fd2e0a000200000116803bf000800700000200000000000000000000000000"
- "00000000000000000000002855c10393",
- "00fe2e0a000200000116803cf000800700000200000000000000000000000000"
- "0000000000000000000000283e94c57d",
- "00ff2e0a000200000116803df000800700000200000000000000000000000000"
- "0000000000000000000000284347e7f0",
- "01002e0a000200000116803ef000800700000200000000000000000000000000"
- "000000000000000000000028be66429d",
- "01012e0a000200000116803ff000800700000200000000000000000000000000"
- "0000000000000000000000284f7db145",
- "01022e0a0002000001490401c000000000000000000000000000000000000000"
- "000000000000000000000028470aa043",
- "01032e0a00020000014904012000000000000000000000000000000000000000"
- "000000000000000000000028a6bc6e48",
- "01042e0a00020000014904011800ffffffff0000000000000000000000000000"
- "000000000000000000000028f747c739",
+ b"00032e0a00020000000200008000000000000000000000000000000000000000"
+ b"00000000000000000000002828ce00e2",
+ b"00042e0a0002000000050101f0002f2f05202020202020202020202020202020"
+ b"202020202000000000000028d4eb4bdf",
+ b"00052e0a00020000000501010f80202020202020202020202020202020202020"
+ b"2020000000000000000000282dbe4b44",
+ b"00062e0a0002000000050104f000303001202020202020202020202020202020"
+ b"202020202000000000000028ef1b035b",
+ b"00072e0a00020000000501040f80202020202020202020202020202020202020"
+ b"202000000000000000000028fec29135",
+ b"00082e0a0002000000050180f000f8f801202020202020202020202020202020"
+ b"202020202000000000000028fd4e0b07",
+ b"00092e0a00020000000501800f80202020202020202020202020202020202020"
+ b"2020000000000000000000283306b3c0",
+ b"000a2e0a0002000000060101f0002f054252434d123456780000000000000000"
+ b"00000000000c000000000028585c2083",
+ b"000b2e0a00020000000601010f004252434d0000000000000000000000000000"
+ b"0000000000000000000000284f0e82b9",
+ b"000c2e0a000200000006010100f8202020202020202020202020202020202020"
+ b"202000000000000000000028e68bdb63",
+ b"000d2e0a00020000000601010004000000000000000000000000000000000000"
+ b"00000000000000000000002857bc2730",
+ b"000e2e0a0002000000060104f00030014252434d123456780000000000000000"
+ b"00000000000c000000000028afe656f5",
+ b"000f2e0a00020000000601040f004252434d0000000000000000000000000000"
+ b"000000000000000000000028f8f6db74",
+ b"00102e0a000200000006010400f8202020202020202020202020202020202020"
+ b"202000000800000000000028064fc177",
+ b"00112e0a00020000000601040004000000000000000000000000000000000000"
+ b"0000000000000000000000285a5c0841",
+ b"00122e0a0002000000060180f000f8014252434d123456780000000000000000"
+ b"00000000000c0000000000286826eafe",
+ b"00132e0a00020000000601800f004252434d0000000000000000000000000000"
+ b"0000000000000000000000281c4b7033",
+ b"00142e0a000200000006018000f8202020202020202020202020202020202020"
+ b"202000084040000000000028ac144eb3",
+ b"00152e0a00020000000601800004000000000000000000000000000000000000"
+ b"0000000000000000000000280a81a9a7",
+ b"00162e0a0002000000070000f0003530323247574f3236363230303301010100"
+ b"0000000000000000000000287ea42d51",
+ b"00172e0a0002000000070001f0003530323247574f3236363230303300000100"
+ b"000000000000000000000028b17f567f",
+ b"00182e0a0002000000830000c000202020202020202020202020202020202020"
+ b"2020202020200000000000280e7eebaa",
+ b"00192e0a00020000008300002000202020202020202020202020202000000000"
+ b"000000000000000000000028a95c03b3",
+ b"001a2e0a00020000008300001000000000000000000000000000000000000000"
+ b"000000000000000000000028f30515a1",
+ b"001b2e0a0002000000850000ffe0000000000000000000000000000000000000"
+ b"000000000000000000000028764c18de",
+ b"001c2e0a0002000000860001c00000001018aaaa000000000000000000000000"
+ b"000000000000000000000028ea220ce0",
+ b"001d2e0a00020000008600012000000000000000000000000000000000000000"
+ b"000000000000000000000028fbdb571a",
+ b"001e2e0a00020000008600011f80000000000000000000000000000000000000"
+ b"000000000000000000000028c2682282",
+ b"001f2e0a00020000008600010078000000000000000000000000000000000000"
+ b"0000000000000000000000289c4809b1",
+ b"00202e0a00020000008600010004000000000000000000000000000000000000"
+ b"000000000000000000000028d174a7d6",
+ b"00212e0a00020000008600010002000000000000000000000000000000000000"
+ b"0000000000000000000000288f353976",
+ b"00222e0a0002000001000000e0004252434d0000000000000000000000000000"
+ b"4252434d123456780000002803bbceb6",
+ b"00232e0a00020000010000001f80000000000000000000000000000000000000"
+ b"0000000000000000000000281b9674db",
+ b"00242e0a00020000010000000040000000000000000000000000000000000000"
+ b"000000000000000000000028b1050b9b",
+ b"00252e0a00020000010000000038000000000000000000000000000003000000"
+ b"0000000000000000000000288266645e",
+ b"00262e0a0002000001010000f80042564d344b3030425241303931352d303038"
+ b"3300b3000001010000000028837d624f",
+ b"00272e0a000200000101000007f8000000010020027c85630016000030000000"
+ b"00000000000000000000002896c707e1",
+ b"00282e0a0002000001068000e00000ff01010000000000000000000000000000"
+ b"00000000000000000000002811acb324",
+ b"00292e0a0002000001068001e00000ff01010000000000000000000000000000"
+ b"00000000000000000000002823ad6aa9",
+ b"002a2e0a0002000001068002e00000ff01010000000000000000000000000000"
+ b"000000000000000000000028a290efd9",
+ b"002b2e0a0002000001068003e00000ff01010000000000000000000000000000"
+ b"000000000000000000000028af893357",
+ b"002c2e0a0002000001068004e00000ff01010000000000000000000000000000"
+ b"000000000000000000000028901141a3",
+ b"002d2e0a0002000001068005e00000ff01010000000000000000000000000000"
+ b"000000000000000000000028c4398bcc",
+ b"002e2e0a0002000001068006e00000ff01010000000000000000000000000000"
+ b"000000000000000000000028e60acd99",
+ b"002f2e0a0002000001068007e00000ff01010000000000000000000000000000"
+ b"0000000000000000000000284b5faf23",
+ b"00302e0a0002000001078001ffff01000800300000050900000000ffff000000"
+ b"008181000000000000000028bef89455",
+ b"00312e0a0002000001080401f000000000000401000000000000000000000000"
+ b"0000000000000000000000287dc5183d",
+ b"00322e0a0002000001150401fff0000080008000000000040100000000010000"
+ b"000000000000000000000028cc0a46a9",
+ b"00332e0a0002000001150401000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000288c42acdd",
+ b"00342e0a0002000001150402fff0000080008000000000040100010000010000"
+ b"000000000000000000000028de9f625a",
+ b"00352e0a0002000001150402000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000280587860b",
+ b"00362e0a0002000001150403fff0000080008000000000040100020000010000"
+ b"000000000000000000000028a49cc820",
+ b"00372e0a0002000001150403000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028b4e4a2b9",
+ b"00382e0a0002000001150404fff0000080008000000000040100030000010000"
+ b"0000000000000000000000288233147b",
+ b"00392e0a0002000001150404000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002881b706b0",
+ b"003a2e0a0002000001150405fff0000080008000000000040100040000010000"
+ b"000000000000000000000028be8efc9f",
+ b"003b2e0a0002000001150405000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028d944804b",
+ b"003c2e0a0002000001150406fff0000080008000000000040100050000010000"
+ b"000000000000000000000028725c3864",
+ b"003d2e0a0002000001150406000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000284e2d5cd2",
+ b"003e2e0a0002000001150407fff0000080008000000000040100060000010000"
+ b"000000000000000000000028464b03ba",
+ b"003f2e0a0002000001150407000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000287006cfd0",
+ b"00402e0a0002000001150408fff0000080008000000000040100070000010000"
+ b"000000000000000000000028cd88ebeb",
+ b"00412e0a0002000001150408000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000285a5905e2",
+ b"00422e0a0002000001158000fff0000100010000000000800000000000010000"
+ b"000000000000000000000028e61b19d1",
+ b"00432e0a0002000001158000000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028b0cc5937",
+ b"00442e0a0002000001158001fff0000100010000000000800000010000010000"
+ b"0000000000000000000000285386bbf2",
+ b"00452e0a0002000001158001000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028c06723ab",
+ b"00462e0a0002000001158002fff0000100010000000000800000020000010000"
+ b"000000000000000000000028ab49704a",
+ b"00472e0a0002000001158002000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002857432f25",
+ b"00482e0a0002000001158003fff0000100010000000000800000030000010000"
+ b"000000000000000000000028b383c057",
+ b"00492e0a0002000001158003000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028dca40d66",
+ b"004a2e0a0002000001158004fff0000100010000000000800000040000010000"
+ b"0000000000000000000000286b7ba0e2",
+ b"004b2e0a0002000001158004000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028fd442363",
+ b"004c2e0a0002000001158005fff0000100010000000000800000050000010000"
+ b"0000000000000000000000280ee9a0b8",
+ b"004d2e0a0002000001158005000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028bc1b9843",
+ b"004e2e0a0002000001158006fff0000100010000000000800000060000010000"
+ b"0000000000000000000000280c535114",
+ b"004f2e0a0002000001158006000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002887032f2b",
+ b"00502e0a0002000001158007fff0000100010000000000800000070000010000"
+ b"000000000000000000000028a77d7f61",
+ b"00512e0a0002000001158007000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002835e9f567",
+ b"00522e0a0002000001158008fff0000100010000000000800100000000010000"
+ b"000000000000000000000028ff4ca94b",
+ b"00532e0a0002000001158008000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000281e2f1e33",
+ b"00542e0a0002000001158009fff0000100010000000000800100010000010000"
+ b"0000000000000000000000283c473db0",
+ b"00552e0a0002000001158009000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002869f51dda",
+ b"00562e0a000200000115800afff0000100010000000000800100020000010000"
+ b"000000000000000000000028046b8feb",
+ b"00572e0a000200000115800a000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002868b1495e",
+ b"00582e0a000200000115800bfff0000100010000000000800100030000010000"
+ b"0000000000000000000000282b927566",
+ b"00592e0a000200000115800b000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028cd43de96",
+ b"005a2e0a000200000115800cfff0000100010000000000800100040000010000"
+ b"000000000000000000000028c49617dd",
+ b"005b2e0a000200000115800c000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028fbbb972a",
+ b"005c2e0a000200000115800dfff0000100010000000000800100050000010000"
+ b"00000000000000000000002893d4c2b5",
+ b"005d2e0a000200000115800d000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028dc9d97ca",
+ b"005e2e0a000200000115800efff0000100010000000000800100060000010000"
+ b"0000000000000000000000280e1ec245",
+ b"005f2e0a000200000115800e000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028be3d56f1",
+ b"00602e0a000200000115800ffff0000100010000000000800100070000010000"
+ b"0000000000000000000000280c046099",
+ b"00612e0a000200000115800f000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028d770e4ea",
+ b"00622e0a0002000001158010fff0000100010000000000800200000000010000"
+ b"0000000000000000000000281b449092",
+ b"00632e0a0002000001158010000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000282b7a8604",
+ b"00642e0a0002000001158011fff0000100010000000000800200010000010000"
+ b"000000000000000000000028ad498068",
+ b"00652e0a0002000001158011000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028a114b304",
+ b"00662e0a0002000001158012fff0000100010000000000800200020000010000"
+ b"000000000000000000000028c091715d",
+ b"00672e0a0002000001158012000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028d4ab49e7",
+ b"00682e0a0002000001158013fff0000100010000000000800200030000010000"
+ b"000000000000000000000028e39dd5dd",
+ b"00692e0a0002000001158013000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000288779ebf0",
+ b"006a2e0a0002000001158014fff0000100010000000000800200040000010000"
+ b"000000000000000000000028c47a741f",
+ b"006b2e0a0002000001158014000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028ce765fcd",
+ b"006c2e0a0002000001158015fff0000100010000000000800200050000010000"
+ b"0000000000000000000000288f732591",
+ b"006d2e0a0002000001158015000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028920b6f5e",
+ b"006e2e0a0002000001158016fff0000100010000000000800200060000010000"
+ b"000000000000000000000028f072e1c3",
+ b"006f2e0a0002000001158016000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028b47ea00f",
+ b"00702e0a0002000001158017fff0000100010000000000800200070000010000"
+ b"00000000000000000000002813461627",
+ b"00712e0a0002000001158017000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002809013378",
+ b"00722e0a0002000001158018fff0000100010000000000800300000000010000"
+ b"0000000000000000000000286168e200",
+ b"00732e0a0002000001158018000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028eccc81f7",
+ b"00742e0a0002000001158019fff0000100010000000000800300010000010000"
+ b"00000000000000000000002855fe8072",
+ b"00752e0a0002000001158019000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028c159c496",
+ b"00762e0a000200000115801afff0000100010000000000800300020000010000"
+ b"00000000000000000000002872652aca",
+ b"00772e0a000200000115801a000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000283ba1c255",
+ b"00782e0a000200000115801bfff0000100010000000000800300030000010000"
+ b"0000000000000000000000286b2ecb95",
+ b"00792e0a000200000115801b000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028441fbe05",
+ b"007a2e0a000200000115801cfff0000100010000000000800300040000010000"
+ b"000000000000000000000028f07ad5d8",
+ b"007b2e0a000200000115801c000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028237d6a28",
+ b"007c2e0a000200000115801dfff0000100010000000000800300050000010000"
+ b"000000000000000000000028e47dfdca",
+ b"007d2e0a000200000115801d000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000280ca941be",
+ b"007e2e0a000200000115801efff0000100010000000000800300060000010000"
+ b"0000000000000000000000283a1ef4d4",
+ b"007f2e0a000200000115801e000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000289c905cd5",
+ b"00802e0a000200000115801ffff0000100010000000000800300070000010000"
+ b"000000000000000000000028384ae4c6",
+ b"00812e0a000200000115801f000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028be87eb55",
+ b"00822e0a0002000001158020fff0000100010000000000800400000000010000"
+ b"000000000000000000000028f0412282",
+ b"00832e0a0002000001158020000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028842ada0c",
+ b"00842e0a0002000001158021fff0000100010000000000800400010000010000"
+ b"000000000000000000000028a6eed1bc",
+ b"00852e0a0002000001158021000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000280f3dd903",
+ b"00862e0a0002000001158022fff0000100010000000000800400020000010000"
+ b"000000000000000000000028474a0823",
+ b"00872e0a0002000001158022000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028e00456b3",
+ b"00882e0a0002000001158023fff0000100010000000000800400030000010000"
+ b"00000000000000000000002851cbe1a6",
+ b"00892e0a0002000001158023000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002869a99563",
+ b"008a2e0a0002000001158024fff0000100010000000000800400040000010000"
+ b"00000000000000000000002867705534",
+ b"008b2e0a0002000001158024000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000286f9570c0",
+ b"008c2e0a0002000001158025fff0000100010000000000800400050000010000"
+ b"000000000000000000000028450ef70e",
+ b"008d2e0a0002000001158025000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002847588afa",
+ b"008e2e0a0002000001158026fff0000100010000000000800400060000010000"
+ b"000000000000000000000028c8218600",
+ b"008f2e0a0002000001158026000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028391a6ba7",
+ b"00902e0a0002000001158027fff0000100010000000000800400070000010000"
+ b"000000000000000000000028afc0878b",
+ b"00912e0a0002000001158027000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002819130d66",
+ b"00922e0a0002000001158028fff0000100010000000000800500000000010000"
+ b"0000000000000000000000289afa4cf7",
+ b"00932e0a0002000001158028000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002873a4e20b",
+ b"00942e0a0002000001158029fff0000100010000000000800500010000010000"
+ b"000000000000000000000028633debd9",
+ b"00952e0a0002000001158029000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000280397eb28",
+ b"00962e0a000200000115802afff0000100010000000000800500020000010000"
+ b"0000000000000000000000280ed5ee7a",
+ b"00972e0a000200000115802a000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028f886ba59",
+ b"00982e0a000200000115802bfff0000100010000000000800500030000010000"
+ b"00000000000000000000002888ff79b1",
+ b"00992e0a000200000115802b000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002846baf278",
+ b"009a2e0a000200000115802cfff0000100010000000000800500040000010000"
+ b"0000000000000000000000281fd1e68f",
+ b"009b2e0a000200000115802c000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028d99760f9",
+ b"009c2e0a000200000115802dfff0000100010000000000800500050000010000"
+ b"000000000000000000000028557aaf84",
+ b"009d2e0a000200000115802d000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028064210fd",
+ b"009e2e0a000200000115802efff0000100010000000000800500060000010000"
+ b"0000000000000000000000285fd6c061",
+ b"009f2e0a000200000115802e000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028299efbb5",
+ b"00a02e0a000200000115802ffff0000100010000000000800500070000010000"
+ b"00000000000000000000002834f127c4",
+ b"00a12e0a000200000115802f000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028edd30591",
+ b"00a22e0a0002000001158030fff0000100010000000000800600000000010000"
+ b"000000000000000000000028183183f2",
+ b"00a32e0a0002000001158030000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028a27e71f6",
+ b"00a42e0a0002000001158031fff0000100010000000000800600010000010000"
+ b"000000000000000000000028bd64dfc0",
+ b"00a52e0a0002000001158031000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002839e2f37e",
+ b"00a62e0a0002000001158032fff0000100010000000000800600020000010000"
+ b"0000000000000000000000283e72282e",
+ b"00a72e0a0002000001158032000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028cef19baa",
+ b"00a82e0a0002000001158033fff0000100010000000000800600030000010000"
+ b"0000000000000000000000281c1caf44",
+ b"00a92e0a0002000001158033000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002814712e27",
+ b"00aa2e0a0002000001158034fff0000100010000000000800600040000010000"
+ b"000000000000000000000028f02a30a4",
+ b"00ab2e0a0002000001158034000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028068fcbf5",
+ b"00ac2e0a0002000001158035fff0000100010000000000800600050000010000"
+ b"000000000000000000000028436bd783",
+ b"00ad2e0a0002000001158035000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000288da3200f",
+ b"00ae2e0a0002000001158036fff0000100010000000000800600060000010000"
+ b"000000000000000000000028c26a02ca",
+ b"00af2e0a0002000001158036000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028147a41ee",
+ b"00b02e0a0002000001158037fff0000100010000000000800600070000010000"
+ b"0000000000000000000000287c2bbec0",
+ b"00b12e0a0002000001158037000f0200020002000200ffff0900000000000000"
+ b"0000000000000000000000284c86c11f",
+ b"00b22e0a0002000001158038fff0000100010000000000800700000000010000"
+ b"00000000000000000000002895b94e06",
+ b"00b32e0a0002000001158038000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028a2b34012",
+ b"00b42e0a0002000001158039fff0000100010000000000800700010000010000"
+ b"00000000000000000000002804b205a3",
+ b"00b52e0a0002000001158039000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002886856d76",
+ b"00b62e0a000200000115803afff0000100010000000000800700020000010000"
+ b"0000000000000000000000282a22752c",
+ b"00b72e0a000200000115803a000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028488e67db",
+ b"00b82e0a000200000115803bfff0000100010000000000800700030000010000"
+ b"000000000000000000000028a55f79ea",
+ b"00b92e0a000200000115803b000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002842d77ba7",
+ b"00ba2e0a000200000115803cfff0000100010000000000800700040000010000"
+ b"000000000000000000000028da65268a",
+ b"00bb2e0a000200000115803c000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028c58443ec",
+ b"00bc2e0a000200000115803dfff0000100010000000000800700050000010000"
+ b"000000000000000000000028997aca59",
+ b"00bd2e0a000200000115803d000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028a2670b7d",
+ b"00be2e0a000200000115803efff0000100010000000000800700060000010000"
+ b"00000000000000000000002813e904cb",
+ b"00bf2e0a000200000115803e000f0200020002000200ffff0900000000000000"
+ b"000000000000000000000028c387a9e5",
+ b"00c02e0a000200000115803ffff0000100010000000000800700070000010000"
+ b"000000000000000000000028d556a6b2",
+ b"00c12e0a000200000115803f000f0200020002000200ffff0900000000000000"
+ b"00000000000000000000002868d9961a",
+ b"00c22e0a0002000001168000f000800000000200000000000000000000000000"
+ b"000000000000000000000028b69b53c1",
+ b"00c32e0a0002000001168001f000800000000200000000000000000000000000"
+ b"000000000000000000000028537705d4",
+ b"00c42e0a0002000001168002f000800000000200000000000000000000000000"
+ b"000000000000000000000028db171b7b",
+ b"00c52e0a0002000001168003f000800000000200000000000000000000000000"
+ b"000000000000000000000028f9b3fa54",
+ b"00c62e0a0002000001168004f000800000000200000000000000000000000000"
+ b"000000000000000000000028cdacda4e",
+ b"00c72e0a0002000001168005f000800000000200000000000000000000000000"
+ b"00000000000000000000002837133b6e",
+ b"00c82e0a0002000001168006f000800000000200000000000000000000000000"
+ b"000000000000000000000028d6447905",
+ b"00c92e0a0002000001168007f000800000000200000000000000000000000000"
+ b"000000000000000000000028021a3910",
+ b"00ca2e0a0002000001168008f000800100000200000000000000000000000000"
+ b"00000000000000000000002835d3cf43",
+ b"00cb2e0a0002000001168009f000800100000200000000000000000000000000"
+ b"00000000000000000000002887ad76fc",
+ b"00cc2e0a000200000116800af000800100000200000000000000000000000000"
+ b"00000000000000000000002895e3d838",
+ b"00cd2e0a000200000116800bf000800100000200000000000000000000000000"
+ b"000000000000000000000028a07489ac",
+ b"00ce2e0a000200000116800cf000800100000200000000000000000000000000"
+ b"0000000000000000000000285d08821d",
+ b"00cf2e0a000200000116800df000800100000200000000000000000000000000"
+ b"000000000000000000000028302249a4",
+ b"00d02e0a000200000116800ef000800100000200000000000000000000000000"
+ b"0000000000000000000000283966d3bc",
+ b"00d12e0a000200000116800ff000800100000200000000000000000000000000"
+ b"0000000000000000000000289519cdb5",
+ b"00d22e0a0002000001168010f000800200000200000000000000000000000000"
+ b"0000000000000000000000281bc99b7b",
+ b"00d32e0a0002000001168011f000800200000200000000000000000000000000"
+ b"000000000000000000000028e483b1a0",
+ b"00d42e0a0002000001168012f000800200000200000000000000000000000000"
+ b"0000000000000000000000286885d8bd",
+ b"00d52e0a0002000001168013f000800200000200000000000000000000000000"
+ b"000000000000000000000028cbe7afd8",
+ b"00d62e0a0002000001168014f000800200000200000000000000000000000000"
+ b"00000000000000000000002809009846",
+ b"00d72e0a0002000001168015f000800200000200000000000000000000000000"
+ b"0000000000000000000000285bee86c4",
+ b"00d82e0a0002000001168016f000800200000200000000000000000000000000"
+ b"0000000000000000000000281f25725c",
+ b"00d92e0a0002000001168017f000800200000200000000000000000000000000"
+ b"00000000000000000000002872e94fe1",
+ b"00da2e0a0002000001168018f000800300000200000000000000000000000000"
+ b"000000000000000000000028e39d572f",
+ b"00db2e0a0002000001168019f000800300000200000000000000000000000000"
+ b"0000000000000000000000281c9dcadd",
+ b"00dc2e0a000200000116801af000800300000200000000000000000000000000"
+ b"0000000000000000000000287c5b8405",
+ b"00dd2e0a000200000116801bf000800300000200000000000000000000000000"
+ b"00000000000000000000002826334420",
+ b"00de2e0a000200000116801cf000800300000200000000000000000000000000"
+ b"00000000000000000000002871ee1536",
+ b"00df2e0a000200000116801df000800300000200000000000000000000000000"
+ b"0000000000000000000000289dfeeeb9",
+ b"00e02e0a000200000116801ef000800300000200000000000000000000000000"
+ b"000000000000000000000028954d55b3",
+ b"00e12e0a000200000116801ff000800300000200000000000000000000000000"
+ b"000000000000000000000028930c564e",
+ b"00e22e0a0002000001168020f000800400000200000000000000000000000000"
+ b"000000000000000000000028b9cec3bf",
+ b"00e32e0a0002000001168021f000800400000200000000000000000000000000"
+ b"0000000000000000000000284263f268",
+ b"00e42e0a0002000001168022f000800400000200000000000000000000000000"
+ b"000000000000000000000028913e5219",
+ b"00e52e0a0002000001168023f000800400000200000000000000000000000000"
+ b"000000000000000000000028efe86fe1",
+ b"00e62e0a0002000001168024f000800400000200000000000000000000000000"
+ b"000000000000000000000028deb045df",
+ b"00e72e0a0002000001168025f000800400000200000000000000000000000000"
+ b"000000000000000000000028255bcd32",
+ b"00e82e0a0002000001168026f000800400000200000000000000000000000000"
+ b"000000000000000000000028355392ad",
+ b"00e92e0a0002000001168027f000800400000200000000000000000000000000"
+ b"000000000000000000000028404a6aca",
+ b"00ea2e0a0002000001168028f000800500000200000000000000000000000000"
+ b"0000000000000000000000281de78f94",
+ b"00eb2e0a0002000001168029f000800500000200000000000000000000000000"
+ b"000000000000000000000028501a3aae",
+ b"00ec2e0a000200000116802af000800500000200000000000000000000000000"
+ b"0000000000000000000000282947d976",
+ b"00ed2e0a000200000116802bf000800500000200000000000000000000000000"
+ b"000000000000000000000028095cfe0d",
+ b"00ee2e0a000200000116802cf000800500000200000000000000000000000000"
+ b"000000000000000000000028bbcfc27a",
+ b"00ef2e0a000200000116802df000800500000200000000000000000000000000"
+ b"000000000000000000000028dbb27396",
+ b"00f02e0a000200000116802ef000800500000200000000000000000000000000"
+ b"000000000000000000000028dbe9b225",
+ b"00f12e0a000200000116802ff000800500000200000000000000000000000000"
+ b"000000000000000000000028840c0b08",
+ b"00f22e0a0002000001168030f000800600000200000000000000000000000000"
+ b"0000000000000000000000287683e4f8",
+ b"00f32e0a0002000001168031f000800600000200000000000000000000000000"
+ b"00000000000000000000002844d131d1",
+ b"00f42e0a0002000001168032f000800600000200000000000000000000000000"
+ b"0000000000000000000000284d2c2c6d",
+ b"00f52e0a0002000001168033f000800600000200000000000000000000000000"
+ b"000000000000000000000028e89a166c",
+ b"00f62e0a0002000001168034f000800600000200000000000000000000000000"
+ b"0000000000000000000000280f47db8c",
+ b"00f72e0a0002000001168035f000800600000200000000000000000000000000"
+ b"0000000000000000000000283ede8b3e",
+ b"00f82e0a0002000001168036f000800600000200000000000000000000000000"
+ b"000000000000000000000028580547db",
+ b"00f92e0a0002000001168037f000800600000200000000000000000000000000"
+ b"000000000000000000000028d72a270e",
+ b"00fa2e0a0002000001168038f000800700000200000000000000000000000000"
+ b"000000000000000000000028c25ce712",
+ b"00fb2e0a0002000001168039f000800700000200000000000000000000000000"
+ b"000000000000000000000028b908637e",
+ b"00fc2e0a000200000116803af000800700000200000000000000000000000000"
+ b"0000000000000000000000285b66e6fa",
+ b"00fd2e0a000200000116803bf000800700000200000000000000000000000000"
+ b"00000000000000000000002855c10393",
+ b"00fe2e0a000200000116803cf000800700000200000000000000000000000000"
+ b"0000000000000000000000283e94c57d",
+ b"00ff2e0a000200000116803df000800700000200000000000000000000000000"
+ b"0000000000000000000000284347e7f0",
+ b"01002e0a000200000116803ef000800700000200000000000000000000000000"
+ b"000000000000000000000028be66429d",
+ b"01012e0a000200000116803ff000800700000200000000000000000000000000"
+ b"0000000000000000000000284f7db145",
+ b"01022e0a0002000001490401c000000000000000000000000000000000000000"
+ b"000000000000000000000028470aa043",
+ b"01032e0a00020000014904012000000000000000000000000000000000000000"
+ b"000000000000000000000028a6bc6e48",
+ b"01042e0a00020000014904011800ffffffff0000000000000000000000000000"
+ b"000000000000000000000028f747c739",
]
mask = "%5s %9s %20s %9s %s"
- print
- print mask % ("seq", "class_id", "class", "instance", "attributes")
+ print()
+ print(mask % ("seq", "class_id", "class", "instance", "attributes"))
for i, data in enumerate(refs):
frame = OmciFrame(hex2raw(data))
omci = frame.omci_message
# frame.show()
- print mask % (
+ print(mask % (
str(i),
str(omci.object_entity_class),
entity_id_to_class_map[omci.object_entity_class].__name__,
- '0x%x' % omci.object_entity_id,
+ b'0x%x' % omci.object_entity_id,
'\n '.join(
'%s: %s' % (k, v) for k, v in omci.object_data.items())
- )
+ ))
def test_onu_reboot(self):
- ref = '0016590a01000000000000000000000000000'\
- '0000000000000000000000000000000000000'\
- '00000000000028'
+ ref = b'0016590a01000000000000000000000000000'\
+ b'0000000000000000000000000000000000000'\
+ b'00000000000028'
frame = OmciFrame(
transaction_id=22,
@@ -1173,13 +1178,13 @@
# since the first rule of interoperability is to be lenient with
# what you receive and strict with what you transmit.
#
- ref = '017d290a008280020000780000000000000000000000' +\
- '0000000000000000000000000000' +\
- '01' +\
- '02' +\
- '0000' +\
- '00000028'
- zeros_24 = '000000000000000000000000000000000000000000000000'
+ ref = b'017d290a008280020000780000000000000000000000' +\
+ b'0000000000000000000000000000' +\
+ b'01' +\
+ b'02' +\
+ b'0000' +\
+ b'00000028'
+ zeros_24 = b'000000000000000000000000000000000000000000000000'
bytes_24 = unhexlify(zeros_24)
attributes = {
"unmarked_frame_option": 0, # 1 octet
@@ -1194,7 +1199,7 @@
entity_class=Ieee8021pMapperServiceProfile.class_id,
success_code=0,
entity_id=0x8002,
- attributes_mask=Ieee8021pMapperServiceProfile.mask_for(*attributes.keys()),
+ attributes_mask=Ieee8021pMapperServiceProfile.mask_for(*list(attributes.keys())),
data=attributes
)
)
@@ -1203,12 +1208,12 @@
def test_get_response_with_errors_max_data(self):
# First a frame with maximum data used up. This aligns the fields up perfectly
# with the simplest definition of a Get Response
- ref = '017d290a008280020900600000000000000000000000' +\
- '0000000000000000000000000000' +\
- '0010' +\
- '0008' +\
- '00000028'
- zeros_24 = '000000000000000000000000000000000000000000000000'
+ ref = b'017d290a008280020900600000000000000000000000' +\
+ b'0000000000000000000000000000' +\
+ b'0010' +\
+ b'0008' +\
+ b'00000028'
+ zeros_24 = b'000000000000000000000000000000000000000000000000'
bytes_24 = unhexlify(zeros_24)
good_attributes = {
"unmarked_frame_option": 0, # 1 octet
@@ -1225,7 +1230,7 @@
entity_class=the_class.class_id,
success_code=9,
entity_id=0x8002,
- attributes_mask=the_class.mask_for(*good_attributes.keys()),
+ attributes_mask=the_class.mask_for(*list(good_attributes.keys())),
unsupported_attributes_mask=the_class.mask_for(*unsupported_attributes),
failed_attributes_mask=the_class.mask_for(*failed_attributes_mask),
data=good_attributes
@@ -1237,12 +1242,12 @@
# Next a frame with only a little data used up. This aligns will require
# the encoder and decoder to skip to the last 8 octets of the data field
# and encode the failed masks there
- ref = '017d290a00828002090040' +\
- '01' + '00000000000000000000' +\
- '0000000000000000000000000000' +\
- '0010' +\
- '0028' +\
- '00000028'
+ ref = b'017d290a00828002090040' +\
+ b'01' + b'00000000000000000000' +\
+ b'0000000000000000000000000000' +\
+ b'0010' +\
+ b'0028' +\
+ b'00000028'
good_attributes = {
"unmarked_frame_option": 1, # 1 octet
@@ -1258,7 +1263,7 @@
entity_class=the_class.class_id,
success_code=9,
entity_id=0x8002,
- attributes_mask=the_class.mask_for(*good_attributes.keys()),
+ attributes_mask=the_class.mask_for(*list(good_attributes.keys())),
unsupported_attributes_mask=the_class.mask_for(*unsupported_attributes),
failed_attributes_mask=the_class.mask_for(*failed_attributes_mask),
data=good_attributes
diff --git a/test/unit/extensions/omci/test_omci_cc.py b/test/unit/extensions/omci/test_omci_cc.py
index 992ba2b..7fee9ae 100644
--- a/test/unit/extensions/omci/test_omci_cc.py
+++ b/test/unit/extensions/omci/test_omci_cc.py
@@ -13,20 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
import binascii
from pyvoltha.adapters.common.frameio.frameio import hexify
from twisted.python.failure import Failure
from unittest import TestCase, main, skip
-from mock.mock_adapter_agent import MockAdapterAgent
-from mock.mock_onu_handler import MockOnuHandler
-from mock.mock_olt_handler import MockOltHandler
-from mock.mock_onu import MockOnu
+from .mock.mock_adapter_agent import MockAdapterAgent
+from .mock.mock_onu_handler import MockOnuHandler
+from .mock.mock_olt_handler import MockOltHandler
+from .mock.mock_onu import MockOnu
from pyvoltha.adapters.extensions.omci.omci_defs import *
from pyvoltha.adapters.extensions.omci.omci_frame import *
from pyvoltha.adapters.extensions.omci.omci_entities import *
from pyvoltha.adapters.extensions.omci.omci_me import ExtendedVlanTaggingOperationConfigurationDataFrame
from pyvoltha.adapters.extensions.omci.omci_cc import OMCI_CC, UNKNOWN_CLASS_ATTRIBUTE_KEY,\
MAX_OMCI_REQUEST_AGE
+from six.moves import range
DEFAULT_OLT_DEVICE_ID = 'default_olt_mock'
DEFAULT_ONU_DEVICE_ID = 'default_onu_mock'
@@ -838,7 +840,6 @@
self.assertEqual(expected, val)
return results
- @skip('for unknown omci failure')
#@deferred()
def test_rx_table_get_extvlantagging(self):
self.setup_one_of_each()
diff --git a/test/unit/extensions/omci/test_omci_configuration.py b/test/unit/extensions/omci/test_omci_configuration.py
index 1cdfd21..1a38b1c 100644
--- a/test/unit/extensions/omci/test_omci_configuration.py
+++ b/test/unit/extensions/omci/test_omci_configuration.py
@@ -13,15 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from hashlib import md5
from unittest import TestCase, main
from nose.tools import raises
from nose.twistedtools import deferred
from copy import deepcopy
-from mock.mock_adapter_agent import MockAdapterAgent, MockCore
-from mock.mock_onu_handler import MockOnuHandler
-from mock.mock_olt_handler import MockOltHandler
-from mock.mock_onu import MockOnu
+from .mock.mock_adapter_agent import MockAdapterAgent, MockCore
+from .mock.mock_onu_handler import MockOnuHandler
+from .mock.mock_olt_handler import MockOltHandler
+from .mock.mock_onu import MockOnu
from pyvoltha.adapters.extensions.omci.openomci_agent import OpenOMCIAgent, OpenOmciAgentDefaults
from pyvoltha.adapters.extensions.omci.onu_configuration import OMCCVersion
from pyvoltha.adapters.extensions.omci.omci_defs import *
diff --git a/test/unit/extensions/omci/test_onu_device_entry.py b/test/unit/extensions/omci/test_onu_device_entry.py
index 9e917f6..105813f 100644
--- a/test/unit/extensions/omci/test_onu_device_entry.py
+++ b/test/unit/extensions/omci/test_onu_device_entry.py
@@ -13,20 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import TestCase, main
from nose.tools import assert_raises
from nose.twistedtools import deferred
from copy import deepcopy
-from mock.mock_adapter_agent import MockAdapterAgent, MockCore
-from mock.mock_onu_handler import MockOnuHandler
-from mock.mock_olt_handler import MockOltHandler
-from mock.mock_onu import MockOnu
+from .mock.mock_adapter_agent import MockAdapterAgent, MockCore
+from .mock.mock_onu_handler import MockOnuHandler
+from .mock.mock_olt_handler import MockOltHandler
+from .mock.mock_onu import MockOnu
from pyvoltha.adapters.extensions.omci.openomci_agent import OpenOMCIAgent, OpenOmciAgentDefaults
from pyvoltha.adapters.extensions.omci.omci_defs import *
from pyvoltha.common.utils.asleep import asleep
from pyvoltha.adapters.extensions.omci.database.mib_db_api import DEVICE_ID_KEY, CLASS_ID_KEY, CREATED_KEY, \
MODIFIED_KEY, MDS_KEY, LAST_SYNC_KEY, VERSION_KEY, DatabaseStateError
from pyvoltha.adapters.extensions.omci.database.mib_db_dict import MibDbVolatileDict
+from six.moves import range
DEFAULT_OLT_DEVICE_ID = 'default_olt_mock'
diff --git a/test/unit/extensions/omci/test_openomci_agent.py b/test/unit/extensions/omci/test_openomci_agent.py
index cef505c..5b0a569 100644
--- a/test/unit/extensions/omci/test_openomci_agent.py
+++ b/test/unit/extensions/omci/test_openomci_agent.py
@@ -13,10 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import TestCase, main
from nose.tools import assert_raises
from copy import deepcopy
-from mock.mock_adapter_agent import MockAdapterAgent, MockCore
+from .mock.mock_adapter_agent import MockAdapterAgent, MockCore
from pyvoltha.adapters.extensions.omci.openomci_agent import OpenOMCIAgent, OpenOmciAgentDefaults
from pyvoltha.adapters.extensions.omci.database.mib_db_ext import MibDbExternal
from pyvoltha.adapters.extensions.omci.database.mib_db_dict import MibDbVolatileDict
diff --git a/test/unit/extensions/omci/test_task_runner.py b/test/unit/extensions/omci/test_task_runner.py
index e35e151..66a71e3 100644
--- a/test/unit/extensions/omci/test_task_runner.py
+++ b/test/unit/extensions/omci/test_task_runner.py
@@ -14,11 +14,12 @@
# limitations under the License.
#
+from __future__ import absolute_import
from unittest import TestCase, main
from nose.tools import raises
from twisted.internet import defer
from twisted.internet.defer import inlineCallbacks, returnValue, CancelledError
-from mock.mock_task import SimpleTask
+from .mock.mock_task import SimpleTask
from nose.twistedtools import deferred
from pyvoltha.adapters.extensions.omci.tasks.task_runner import TaskRunner