VOL-2241: Python 3 migration
- rename adapter class file and remove unneeded __init__ to make imports work without major rearrange
- venv and Dockerfile fixups needed for new pyvoltha (cannot install old first)
- clean up yaml config file as it contained empty entries that failed to parse
- clean up imports
- remove itervalues iter*
- convert to list() as needed
- test with python 3.6
- skip non-dict items in tcont loop
- update to voltha-protos 2.1.0
- migrate socketserver and simplehttpserver to python3 import
Change-Id: Id8efa72b6796a3055b1927716503a33544bb6548
diff --git a/python/adapters/brcm_openomci_onu/onu_gem_port.py b/python/adapters/brcm_openomci_onu/onu_gem_port.py
index 1ee28a6..baaa27d 100644
--- a/python/adapters/brcm_openomci_onu/onu_gem_port.py
+++ b/python/adapters/brcm_openomci_onu/onu_gem_port.py
@@ -13,10 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import absolute_import
import structlog
from twisted.internet.defer import inlineCallbacks, returnValue
-from pyvoltha.adapters.extensions.omci.omci_me import *
-from pyvoltha.adapters.extensions.omci.omci_defs import *
+from pyvoltha.adapters.extensions.omci.omci_me import GemInterworkingTpFrame, GemPortNetworkCtpFrame
+from pyvoltha.adapters.extensions.omci.omci_defs import ReasonCodes
RC = ReasonCodes
@@ -262,6 +263,7 @@
@staticmethod
def create(handler, gem_port):
+ log = structlog.get_logger(gem_port=gem_port)
log.debug('function-entry', gem_port=gem_port)
return OnuGemPort(gem_id=gem_port['gemport_id'],