VOL-2311: Better logging and remove old code

- tasks have better detail
- 1.x functions removed
- extraineous logging removed
- build info injected into environment, viewable
  in log and voltctl similar to openolt

Change-Id: I9b22334c3049efa857b485cca28a343b36514ab6
diff --git a/python/Makefile b/python/Makefile
index fe529a0..ee23590 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -20,6 +20,10 @@
 # Variables
 VERSION                  ?= $(shell cat ../VERSION)
 
+DOCKER_LABEL_VCS_DIRTY     = false
+ifneq ($(shell git ls-files --others --modified --exclude-standard 2>/dev/null | wc -l | sed -e 's/ //g'),0)
+    DOCKER_LABEL_VCS_DIRTY = true
+endif
 ## Docker related
 DOCKER_REGISTRY          ?=
 DOCKER_REPOSITORY        ?=
@@ -29,15 +33,10 @@
 TYPE                     ?= minimal
 
 ## Docker labels. Only set ref and commit date if committed
-DOCKER_LABEL_VCS_URL     ?= $(shell git remote get-url $(shell git remote))
-DOCKER_LABEL_BUILD_DATE  ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
-DOCKER_LABEL_COMMIT_DATE = $(shell git show -s --format=%cd --date=iso-strict HEAD)
-
-ifeq ($(shell git ls-files --others --modified --exclude-standard 2>/dev/null | wc -l | sed -e 's/ //g'),0)
-  DOCKER_LABEL_VCS_REF = $(shell git rev-parse HEAD)
-else
-  DOCKER_LABEL_VCS_REF = $(shell git rev-parse HEAD)+dirty
-endif
+DOCKER_LABEL_VCS_URL       ?= $(shell git remote get-url $(shell git remote))
+DOCKER_LABEL_VCS_REF       = $(shell git rev-parse HEAD)
+DOCKER_LABEL_BUILD_DATE    ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
+DOCKER_LABEL_COMMIT_DATE   = $(shell git show -s --format=%cd --date=iso-strict HEAD)
 
 .PHONY: venv docker-build local-protos local-pyvoltha
 
@@ -86,6 +85,7 @@
     --build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
     --build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
     --build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
+    --build-arg org_opencord_vcs_dirty="${DOCKER_LABEL_VCS_DIRTY}" \
     -f docker/Dockerfile.openonu_adapter .
 
 docker-push:
diff --git a/python/adapters/brcm_openomci_onu/VERSION b/python/adapters/brcm_openomci_onu/VERSION
deleted file mode 100644
index 97ade15..0000000
--- a/python/adapters/brcm_openomci_onu/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-2.2.0-dev
diff --git a/python/adapters/brcm_openomci_onu/brcm_openomci_onu_adapter.py b/python/adapters/brcm_openomci_onu/brcm_openomci_onu_adapter.py
index 54840e7..a921ef8 100644
--- a/python/adapters/brcm_openomci_onu/brcm_openomci_onu_adapter.py
+++ b/python/adapters/brcm_openomci_onu/brcm_openomci_onu_adapter.py
@@ -42,8 +42,6 @@
 from omci.brcm_capabilities_task import BrcmCapabilitiesTask
 from copy import deepcopy
 
-log = structlog.get_logger()
-
 
 @implementer(IAdapterInterface)
 class BrcmOpenomciOnuAdapter(object):
@@ -59,15 +57,17 @@
         )
     ]
 
-    def __init__(self, core_proxy, adapter_proxy, config):
-        log.debug('BrcmOpenomciOnuAdapter-function-entry', config=config)
+    def __init__(self, core_proxy, adapter_proxy, config, build_info):
+        self.log = structlog.get_logger()
+        self.log.debug('starting-adapter', config=config)
+
         self.core_proxy = core_proxy
         self.adapter_proxy = adapter_proxy
         self.config = config
         self.descriptor = Adapter(
             id=self.name,
-            vendor='Voltha project',
-            version='2.0',
+            vendor='VOLTHA OpenONU',
+            version=build_info.version,
             config=AdapterConfig(log_level=LogLevel.INFO)
         )
         self.devices_handlers = dict()
@@ -89,25 +89,25 @@
     @property
     def omci_agent(self):
         if not hasattr(self, '_omci_agent') or self._omci_agent is None:
-            log.debug('creating-omci-agent')
+            self.log.debug('creating-omci-agent')
             self._omci_agent = OpenOMCIAgent(self.core_proxy,
                                              self.adapter_proxy,
                                              support_classes=self.broadcom_omci)
         return self._omci_agent
 
     def start(self):
-        log.debug('starting')
+        self.log.debug('starting')
         self.omci_agent.start()
-        log.info('started')
+        self.log.info('started')
 
     def stop(self):
-        log.debug('stopping')
+        self.log.debug('stopping')
 
         omci, self._omci_agent = self._omci_agent, None
         if omci is not None:
             self._omci_agent.stop()
 
-        log.info('stopped')
+        self.log.info('stopped')
 
     def adapter_descriptor(self):
         return self.descriptor
@@ -122,13 +122,13 @@
         raise NotImplementedError()
 
     def adopt_device(self, device):
-        log.info('adopt_device', device_id=device.id)
+        self.log.info('adopt-device', device_id=device.id)
         self.devices_handlers[device.id] = BrcmOpenomciOnuHandler(self, device.id)
         reactor.callLater(0, self.devices_handlers[device.id].activate, device)
         return device
 
     def reconcile_device(self, device):
-        log.info('reconcile-device', device_id=device.id)
+        self.log.info('reconcile-device', device_id=device.id)
         self.devices_handlers[device.id] = BrcmOpenomciOnuHandler(self, device.id)
         reactor.callLater(0, self.devices_handlers[device.id].reconcile, device)
 
@@ -136,21 +136,21 @@
         raise NotImplementedError()
 
     def disable_device(self, device):
-        log.info('disable-onu-device', device_id=device.id)
+        self.log.info('disable-onu-device', device_id=device.id)
         if device.id in self.devices_handlers:
             handler = self.devices_handlers[device.id]
             if handler is not None:
                 handler.disable(device)
 
     def reenable_device(self, device):
-        log.info('reenable-onu-device', device_id=device.id)
+        self.log.info('reenable-onu-device', device_id=device.id)
         if device.id in self.devices_handlers:
             handler = self.devices_handlers[device.id]
             if handler is not None:
                 handler.reenable(device)
 
     def reboot_device(self, device):
-        log.info('reboot-device', device_id=device.id)
+        self.log.info('reboot-device', device_id=device.id)
         if device.id in self.devices_handlers:
             handler = self.devices_handlers[device.id]
             if handler is not None:
@@ -177,11 +177,11 @@
         :param device: A Voltha.Device object.
         :return: Will return result of self test
         """
-        log.info('self-test-device - Not implemented yet', device_id=device.id, serial_number=device.serial_number)
+        self.log.info('self-test-device - Not implemented yet', device_id=device.id, serial_number=device.serial_number)
         raise NotImplementedError()
 
     def delete_device(self, device):
-        log.info('delete-device', device_id=device.id)
+        self.log.info('delete-device', device_id=device.id)
         if device.id in self.devices_handlers:
             handler = self.devices_handlers[device.id]
             if handler is not None:
@@ -194,7 +194,7 @@
 
     # TODO(smbaker): When BrcmOpenomciOnuAdapter is updated to inherit from OnuAdapter, this function can be deleted
     def update_pm_config(self, device, pm_config):
-        log.info("adapter-update-pm-config", device_id=device.id, serial_number=device.serial_number,
+        self.log.info("adapter-update-pm-config", device_id=device.id, serial_number=device.serial_number,
                  pm_config=pm_config)
         handler = self.devices_handlers[device.id]
         handler.update_pm_config(device, pm_config)
@@ -212,11 +212,11 @@
         raise NotImplementedError()
 
     def send_proxied_message(self, proxy_address, msg):
-        log.debug('send-proxied-message', proxy_address=proxy_address, msg=msg)
+        self.log.debug('send-proxied-message', proxy_address=proxy_address, msg=msg)
 
     @inlineCallbacks
     def receive_proxied_message(self, proxy_address, msg):
-        log.debug('receive-proxied-message', proxy_address=proxy_address,
+        self.log.debug('receive-proxied-message', proxy_address=proxy_address,
                  device_id=proxy_address.device_id, msg=hexify(msg))
         # Device_id from the proxy_address is the olt device id. We need to
         # get the onu device id using the port number in the proxy_address
@@ -227,12 +227,12 @@
             handler.receive_message(msg)
 
     def receive_packet_out(self, logical_device_id, egress_port_no, msg):
-        log.info('packet-out', logical_device_id=logical_device_id,
+        self.log.debug('packet-out', logical_device_id=logical_device_id,
                  egress_port_no=egress_port_no, msg_len=len(msg))
 
     @inlineCallbacks
     def receive_inter_adapter_message(self, msg):
-        log.debug('receive_inter_adapter_message', msg=msg)
+        self.log.debug('receive-inter-adapter-message', msg=msg)
         proxy_address = msg['proxy_address']
         assert proxy_address is not None
         # Device_id from the proxy_address is the olt device id. We need to
@@ -243,106 +243,39 @@
             handler = self.devices_handlers[device.id]
             handler.event_messages.put(msg)
         else:
-            log.error("device-not-found")
+            self.log.error("device-not-found")
 
     def get_ofp_port_info(self, device, port_no):
         ofp_port_info = self.devices_handlers[device.id].get_ofp_port_info(device, port_no)
-        log.debug('get_ofp_port_info', device_id=device.id,
+        self.log.debug('get-ofp-port-info', device_id=device.id,
                   port_name=ofp_port_info.port.ofp_port.name, port_no=ofp_port_info.port.device_port_no)
         return ofp_port_info
 
     def process_inter_adapter_message(self, msg):
         # Unpack the header to know which device needs to handle this message
         if msg.header:
-            log.debug('process-inter-adapter-message', type=msg.header.type, from_topic=msg.header.from_topic,
+            self.log.debug('process-inter-adapter-message', type=msg.header.type, from_topic=msg.header.from_topic,
                       to_topic=msg.header.to_topic, to_device_id=msg.header.to_device_id)
             handler = self.devices_handlers[msg.header.to_device_id]
             handler.process_inter_adapter_message(msg)
 
     def create_interface(self, device, data):
-        log.debug('create-interface', device_id=device.id)
+        self.log.debug('create-interface', device_id=device.id)
         if device.id in self.devices_handlers:
             handler = self.devices_handlers[device.id]
             if handler is not None:
                 handler.create_interface(data)
 
     def update_interface(self, device, data):
-        log.debug('update-interface', device_id=device.id)
+        self.log.debug('update-interface', device_id=device.id)
         if device.id in self.devices_handlers:
             handler = self.devices_handlers[device.id]
             if handler is not None:
                 handler.update_interface(data)
 
     def remove_interface(self, device, data):
-        log.debug('remove-interface', device_id=device.id)
+        self.log.debug('remove-interface', device_id=device.id)
         if device.id in self.devices_handlers:
             handler = self.devices_handlers[device.id]
             if handler is not None:
                 handler.remove_interface(data)
-
-    def receive_onu_detect_state(self, device_id, state):
-        raise NotImplementedError()
-
-    def create_tcont(self, device, tcont_data, traffic_descriptor_data):
-        log.debug('create-tcont', device_id=device.id)
-        if device.id in self.devices_handlers:
-            handler = self.devices_handlers[device.id]
-            if handler is not None:
-                handler.create_tcont(tcont_data, traffic_descriptor_data)
-
-    def update_tcont(self, device, tcont_data, traffic_descriptor_data):
-        raise NotImplementedError()
-
-    def remove_tcont(self, device, tcont_data, traffic_descriptor_data):
-        log.debug('remove-tcont', device_id=device.id)
-        if device.id in self.devices_handlers:
-            handler = self.devices_handlers[device.id]
-            if handler is not None:
-                handler.remove_tcont(tcont_data, traffic_descriptor_data)
-
-    def create_gemport(self, device, data):
-        log.debug('create-gemport', device_id=device.id)
-        if device.id in self.devices_handlers:
-            handler = self.devices_handlers[device.id]
-            if handler is not None:
-                handler.create_gemport(data)
-
-    def update_gemport(self, device, data):
-        raise NotImplementedError()
-
-    def remove_gemport(self, device, data):
-        log.debug('remove-gemport', device_id=device.id)
-        if device.id in self.devices_handlers:
-            handler = self.devices_handlers[device.id]
-            if handler is not None:
-                handler.remove_gemport(data)
-
-    def create_multicast_gemport(self, device, data):
-        log.debug('create-multicast-gemport', device_id=device.id)
-        if device.id in self.devices_handlers:
-            handler = self.devices_handlers[device.id]
-            if handler is not None:
-                handler.create_multicast_gemport(data)
-
-    def update_multicast_gemport(self, device, data):
-        raise NotImplementedError()
-
-    def remove_multicast_gemport(self, device, data):
-        raise NotImplementedError()
-
-    def create_multicast_distribution_set(self, device, data):
-        raise NotImplementedError()
-
-    def update_multicast_distribution_set(self, device, data):
-        raise NotImplementedError()
-
-    def remove_multicast_distribution_set(self, device, data):
-        raise NotImplementedError()
-
-    def suppress_alarm(self, filter):
-        raise NotImplementedError()
-
-    def unsuppress_alarm(self, filter):
-        raise NotImplementedError()
-
-
diff --git a/python/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py b/python/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
index 05d6730..f05b293 100644
--- a/python/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
+++ b/python/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
@@ -78,7 +78,7 @@
 
     def __init__(self, adapter, device_id):
         self.log = structlog.get_logger(device_id=device_id)
-        self.log.debug('BrcmOpenomciOnuHandler')
+        self.log.debug('starting-handler')
         self.adapter = adapter
         self.core_proxy = adapter.core_proxy
         self.adapter_proxy = adapter.adapter_proxy
@@ -137,8 +137,8 @@
             self.kv_client = ConsulStore(host, port,
                                          TechProfile.KV_STORE_TECH_PROFILE_PATH_PREFIX)
         else:
-            self.log.error('Invalid-backend')
-            raise Exception("Invalid-backend-for-kv-store")
+            self.log.error('invalid-backend')
+            raise Exception("invalid-backend-for-kv-store")
 
     @property
     def enabled(self):
@@ -187,7 +187,7 @@
             self.omci_cc.receive_message(msg)
 
     def get_ofp_port_info(self, device, port_no):
-        self.log.info('get_ofp_port_info', port_no=port_no, device_id=device.id)
+        self.log.debug('get-ofp-port-info', port_no=port_no, device_id=device.id)
         cap = OFPPF_1GB_FD | OFPPF_FIBER
 
         hw_addr = mac_str_to_tuple('08:%02x:%02x:%02x:%02x:%02x' %
@@ -199,7 +199,7 @@
 
         uni_port = self.uni_port(int(port_no))
         name = device.serial_number + '-' + str(uni_port.mac_bridge_port_num)
-        self.log.debug('ofp_port_name', port_no=port_no, name=name, uni_port=uni_port)
+        self.log.debug('ofp-port-name', port_no=port_no, name=name, uni_port=uni_port)
 
         ofstate = OFPPS_LINK_DOWN
         if uni_port.operstatus is OperStatus.ACTIVE:
@@ -247,7 +247,7 @@
             self.logical_device_id = self.device_id
 
             yield self.core_proxy.device_update(device)
-            self.log.debug('device updated', device_id=device.id, serial_number=device.serial_number)
+            self.log.debug('device-updated', device_id=device.id, serial_number=device.serial_number)
 
             yield self._init_pon_state()
 
@@ -264,7 +264,7 @@
                 'heartbeat': self.heartbeat,
                 OnuOmciPmMetrics.OMCI_DEV_KEY: self._onu_omci_device
             }
-            self.log.debug('create-OnuPmMetrics', device_id=device.id, serial_number=device.serial_number)
+            self.log.debug('create-pm-metrics', device_id=device.id, serial_number=device.serial_number)
             self.pm_metrics = OnuPmMetrics(self.events, self.core_proxy, self.device_id,
                                            self.logical_device_id, device.serial_number,
                                            grouped=True, freq_override=False, **kwargs)
@@ -330,7 +330,7 @@
 
     @inlineCallbacks
     def _init_pon_state(self):
-        self.log.debug('_init-pon-state', device_id=self.device_id, device_logical_id=self.logical_device_id)
+        self.log.debug('init-pon-state', device_id=self.device_id, device_logical_id=self.logical_device_id)
 
         self._pon = PonPort.create(self, self._pon_port_number)
         self._pon.add_peer(self.parent_id, self._pon_port_number)
@@ -712,7 +712,6 @@
             _set_vlan_vid = None
             _tunnel_id = None
 
-            self.log.debug('bulk-flow-update', device_id=device.id, flow=flow)
             try:
                 write_metadata = fd.get_write_metadata(flow)
                 if write_metadata is None:
@@ -721,7 +720,7 @@
 
                 # extract tp id from flow
                 tp_id = (write_metadata >> 32) & 0xFFFF
-                self.log.info("tp-id-in-flow", tp_id=tp_id)
+                self.log.debug("tp-id-in-flow", tp_id=tp_id)
 
                 _in_port = fd.get_in_port(flow)
                 assert _in_port is not None
@@ -941,7 +940,7 @@
     # Called each time there is an onu "up" indication from the olt handler
     @inlineCallbacks
     def create_interface(self, onu_indication):
-        self.log.debug('create-interface', onu_id=onu_indication.onu_id,
+        self.log.info('create-interface', onu_id=onu_indication.onu_id,
                        serial_number=onu_indication.serial_number)
         self._onu_indication = onu_indication
 
@@ -961,7 +960,7 @@
     # TODO: possibly other reasons to "update" from the olt?
     @inlineCallbacks
     def update_interface(self, onu_indication):
-        self.log.debug('update-interface', onu_id=onu_indication.onu_id,
+        self.log.info('update-interface', onu_id=onu_indication.onu_id,
                        serial_number=onu_indication.serial_number)
 
         if onu_indication.oper_state == 'down' or onu_indication.oper_state == "unreachable":
@@ -984,7 +983,7 @@
     # Not currently called by olt or anything else
     @inlineCallbacks
     def remove_interface(self, data):
-        self.log.debug('remove-interface', data=data)
+        self.log.info('remove-interface', data=data)
 
         self.log.debug('stopping-openomci-statemachine')
         reactor.callLater(0, self._onu_omci_device.stop)
@@ -998,39 +997,10 @@
         yield self.disable_ports(lock_ports=False)
         yield self.core_proxy.device_reason_update(self.device_id, "stopping-openomci")
 
-        # TODO: im sure there is more to do here
-
-    # Not currently called.  Would be called presumably from the olt handler
-    @inlineCallbacks
-    def remove_gemport(self, data):
-        self.log.debug('remove-gemport', data=data)
-        device = yield self.core_proxy.get_device(self.device_id)
-        if device.connect_status != ConnectStatus.REACHABLE:
-            self.log.error('device-unreachable')
-            return
-
-    # Not currently called.  Would be called presumably from the olt handler
-    @inlineCallbacks
-    def remove_tcont(self, tcont_data, traffic_descriptor_data):
-        self.log.debug('remove-tcont', tcont_data=tcont_data, traffic_descriptor_data=traffic_descriptor_data)
-        device = yield self.core_proxy.get_device(self.device_id)
-        if device.connect_status != ConnectStatus.REACHABLE:
-            self.log.error('device-unreachable')
-            return
-
-        # TODO: Create some omci task that encompases this what intended
-
-    # Not currently called.  Would be called presumably from the olt handler
-    def create_multicast_gemport(self, data):
-        self.log.debug('create-multicast-gem-port', data=data)
-
-        # TODO: create objects and populate for later omci calls
-
     @inlineCallbacks
     def disable(self, device):
-        self.log.debug('disable', device_id=device.id, serial_number=device.serial_number)
+        self.log.info('disable', device_id=device.id, serial_number=device.serial_number)
         try:
-            self.log.info('sending-uni-lock-towards-device', device_id=device.id, serial_number=device.serial_number)
             yield self.disable_ports(lock_ports=True)
             yield self.core_proxy.device_reason_update(self.device_id, "omci-admin-lock")
             yield self.core_proxy.device_state_update(self.device_id, oper_status=OperStatus.UNKNOWN)
@@ -1040,9 +1010,8 @@
 
     @inlineCallbacks
     def reenable(self, device):
-        self.log.debug('reenable', device_id=device.id, serial_number=device.serial_number)
+        self.log.info('reenable', device_id=device.id, serial_number=device.serial_number)
         try:
-            self.log.info('sending-uni-unlock-towards-device', device_id=device.id, serial_number=device.serial_number)
             yield self.core_proxy.device_state_update(device.id,
                                                       oper_status=OperStatus.ACTIVE,
                                                       connect_status=ConnectStatus.REACHABLE)
@@ -1074,7 +1043,6 @@
     def disable_ports(self, lock_ports=True):
         self.log.info('disable-ports', device_id=self.device_id)
 
-        self.log.info('unsubscribe-to-port-events', device_id=self.device_id)
         bus = self._onu_omci_device.event_bus
         bus.unsubscribe(self._port_state_subscription)
         self._port_state_subscription = None
@@ -1085,7 +1053,6 @@
             self.log.info('disable-port', device_id=self.device_id, port=port)
 
         if lock_ports is True:
-            self.log.info('locking-ports', device_id=self.device_id)
             self.lock_ports(lock=True)
 
         yield self.core_proxy.ports_state_update(self.device_id, OperStatus.UNKNOWN)
@@ -1095,13 +1062,10 @@
         self.log.info('enable-ports', device_id=self.device_id)
 
         # Listen for UNI link state alarms and set the oper_state based on that rather than assuming all UNI are up
-        self.log.info('subscribe-to-port-events', device_id=self.device_id)
         bus = self._onu_omci_device.event_bus
         topic = OnuDeviceEntry.event_bus_topic(self.device_id,
                                                OnuDeviceEvents.PortEvent)
         self._port_state_subscription = bus.subscribe(topic, self.port_state_handler)
-
-        self.log.info('unlocking-ports', device_id=self.device_id)
         self.lock_ports(lock=False)
 
         # TODO: Currently the only VEIP capable ONU i can test with does not send UNI link state alarms
diff --git a/python/adapters/brcm_openomci_onu/main.py b/python/adapters/brcm_openomci_onu/main.py
index f6d45ef..b1e9873 100755
--- a/python/adapters/brcm_openomci_onu/main.py
+++ b/python/adapters/brcm_openomci_onu/main.py
@@ -21,13 +21,13 @@
 import argparse
 import os
 import time
-import logging
+import types
 
 import arrow
 import yaml
 import socketserver
+import configparser
 
-from packaging.version import Version
 from simplejson import dumps
 from twisted.internet.defer import inlineCallbacks, returnValue
 from twisted.internet.task import LoopingCall
@@ -52,7 +52,7 @@
 from probe import Probe
 
 defs = dict(
-    version_file='./VERSION',
+    build_info_file='./BUILDINFO',
     config=os.environ.get('CONFIG', './openonu.yml'),
     container_name_regex=os.environ.get('CONTAINER_NUMBER_EXTRACTOR', '^.*\.(['
                                                                       '0-9]+)\..*$'),
@@ -237,7 +237,6 @@
                         default=defs['event_topic'],
                         help=_help)
 
-
     _help = '<hostname>:<port> for liveness and readiness probes (default: %s)' % defs['probe']
     parser.add_argument(
         '-P', '--probe', dest='probe', action='store',
@@ -265,11 +264,31 @@
     return config
 
 
+def get_build_info():
+    path = defs['build_info_file']
+    if not path.startswith('/'):
+        dir = os.path.dirname(os.path.abspath(__file__))
+        path = os.path.join(dir, path)
+    path = os.path.abspath(path)
+    build_info = configparser.ConfigParser()
+    build_info.read(path)
+    results = types.SimpleNamespace(
+        version=build_info.get('buildinfo', 'version', fallback='unknown'),
+        vcs_ref=build_info.get('buildinfo', 'vcs_ref', fallback='unknown'),
+        vcs_dirty=build_info.get('buildinfo', 'vcs_dirty', fallback='unknown'),
+        build_time=build_info.get('buildinfo', 'build_time', fallback='unknown')
+    )
+    return results
+
+
 def print_banner(log):
-   log.info('                                                    ')
-   log.info('               OpenOnu Adapter                      ')
-   log.info('                                                    ')
-   log.info('(to stop: press Ctrl-C)')
+    log.info('       ___________ _____ _   _ _____ _   _ _   _       ')
+    log.info('      |  _  | ___ \  ___| \ | |  _  | \ | | | | |      ')
+    log.info('      | | | | |_/ / |__ |  \| | | | |  \| | | | |      ')
+    log.info('      | | | |  __/|  __|| . ` | | | | . ` | | | |      ')
+    log.info('      \ \_/ / |   | |___| |\  \ \_/ / |\  | |_| |      ')
+    log.info('       \___/\_|   \____/\_| \_/\___/\_| \_/\___/       ')
+    log.info('                                                       ')
 
 
 @implementer(IComponent)
@@ -298,8 +317,8 @@
         self.log.info('container-number-extractor',
                       regex=args.container_name_regex)
 
-        self.adapter_version = self.get_version()
-        self.log.info('OpenONU-Adapter-Version', version=self.adapter_version)
+        self.build_info = get_build_info()
+        self.log.info('OpenONU-Adapter-Version', build_version=self.build_info)
 
         if not args.no_banner:
             print_banner(self.log)
@@ -319,23 +338,6 @@
             self.start_heartbeat()
             self.start_kafka_cluster_heartbeat(self.instance_id)
 
-    def get_version(self):
-        path = defs['version_file']
-        if not path.startswith('/'):
-            dir = os.path.dirname(os.path.abspath(__file__))
-            path = os.path.join(dir, path)
-
-        path = os.path.abspath(path)
-        version_file = open(path, 'r')
-        v = version_file.read()
-
-        # Use Version to validate the version string - exception will be raised
-        # if the version is invalid
-        Version(v)
-
-        version_file.close()
-        return v
-
     def start(self):
         self.start_reactor()  # will not return except Keyboard interrupt
 
@@ -392,7 +394,8 @@
 
             self.adapter = BrcmOpenomciOnuAdapter(
                 core_proxy=self.core_proxy, adapter_proxy=self.adapter_proxy,
-                config=config)
+                config=config,
+                build_info=self.build_info)
 
             self.adapter.start()
 
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_capabilities_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_capabilities_task.py
index b6ca406..80e6463 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_capabilities_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_capabilities_task.py
@@ -14,7 +14,6 @@
 # limitations under the License.
 
 from __future__ import absolute_import
-import structlog
 from pyvoltha.adapters.extensions.omci.tasks.onu_capabilities_task import OnuCapabilitiesTask
 from twisted.internet.defer import failure
 
@@ -44,9 +43,6 @@
         :param omci_agent: (OmciAdapterAgent) OMCI Adapter agent
         :param device_id: (str) ONU Device ID
         """
-        self.log = structlog.get_logger(device_id=device_id)
-        self.log.debug('function-entry')
-
         super(BrcmCapabilitiesTask, self).__init__(omci_agent, device_id)
         self._omci_managed = False      # TODO: Look up capabilities/model number
 
@@ -59,7 +55,6 @@
 
         :return: (set of ints)
         """
-        self.log.debug('function-entry')
 
         if self._omci_managed:
             return super(BrcmCapabilitiesTask, self).supported_managed_entities
@@ -83,7 +78,6 @@
 
         :return: (set of EntityOperations)
         """
-        self.log.debug('function-entry')
 
         if self._omci_managed:
             return super(BrcmCapabilitiesTask, self).supported_message_types
@@ -127,7 +121,6 @@
         Then a loop is entered and get-next commands are sent for each sequence
         requested.
         """
-        self.log.debug('function-entry')
 
         self.log.info('perform-get')
 
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py
index eaa8ff5..b0fe3d8 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_mib_download_task.py
@@ -13,7 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import structlog
 from twisted.internet import reactor
 from twisted.internet.defer import inlineCallbacks, returnValue, TimeoutError, failure
 from pyvoltha.adapters.extensions.omci.omci_me import PptpEthernetUniFrame, GalEthernetProfileFrame, \
@@ -65,10 +64,6 @@
         :param omci_agent: (OmciAdapterAgent) OMCI Adapter agent
         :param device_id: (str) ONU Device ID
         """
-
-        self.log = structlog.get_logger(device_id=handler.device_id)
-        self.log.debug('function-entry')
-
         super(BrcmMibDownloadTask, self).__init__(BrcmMibDownloadTask.name,
                                                   omci_agent,
                                                   handler.device_id,
@@ -102,7 +97,6 @@
         self._free_dl_prior_q_entity_ids = set()
 
     def cancel_deferred(self):
-        self.log.debug('function-entry')
         super(BrcmMibDownloadTask, self).cancel_deferred()
 
         d, self._local_deferred = self._local_deferred, None
@@ -116,7 +110,6 @@
         """
         Start the MIB Download
         """
-        self.log.debug('function-entry')
         super(BrcmMibDownloadTask, self).start()
         self._local_deferred = reactor.callLater(0, self.perform_mib_download)
 
@@ -124,9 +117,6 @@
         """
         Shutdown MIB Synchronization tasks
         """
-        self.log.debug('function-entry')
-        self.log.debug('stopping')
-
         self.cancel_deferred()
         super(BrcmMibDownloadTask, self).stop()
 
@@ -139,7 +129,6 @@
         :param operation: (str) what operation was being performed
         :return: True if successful, False if the entity existed (already created)
         """
-        self.log.debug('function-entry')
 
         omci_msg = results.fields['omci_message'].fields
         status = omci_msg['success_code']
@@ -170,7 +159,6 @@
         and other characteristics are done as needed.
         """
         try:
-            self.log.debug('function-entry')
             self.log.info('perform-download')
 
             if self._handler.enabled and len(self._handler.uni_ports) > 0:
@@ -207,7 +195,6 @@
 
     @inlineCallbacks
     def perform_initial_bridge_setup(self):
-        self.log.debug('function-entry')
 
         omci_cc = self._onu_device.omci_cc
         try:
@@ -240,7 +227,6 @@
 
     @inlineCallbacks
     def perform_uni_initial_bridge_setup(self, uni_port):
-        self.log.debug('function-entry')
         omci_cc = self._onu_device.omci_cc
         frame = None
         try:
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py
index b75d791..3fa3ddc 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_tp_delete_task.py
@@ -60,16 +60,17 @@
         :param uni_id: (int) numeric id of the uni port on the onu device, starts at 0
         :param tp_table_id: (int) Technology Profile Table-ID
         """
-        log = structlog.get_logger(device_id=handler.device_id, uni_id=uni_id)
-        log.debug('function-entry')
-
         super(BrcmTpDeleteTask, self).__init__(BrcmTpDeleteTask.name,
                                                omci_agent,
                                                handler.device_id,
                                                priority=DELETE_TP_TASK_PRIORITY,
                                                exclusive=True)
 
-        self.log = log
+        self.log = structlog.get_logger(device_id=handler.device_id,
+                                        name=BrcmTpDeleteTask.name,
+                                        task_id=self._task_id,
+                                        uni_id=uni_id,
+                                        tp_table_id=tp_table_id)
 
         self._onu_device = omci_agent.get_device(handler.device_id)
         self._local_deferred = None
@@ -96,7 +97,6 @@
             handler.pon_port.mac_bridge_port_ani_entity_id
 
     def cancel_deferred(self):
-        self.log.debug('function-entry')
         super(BrcmTpDeleteTask, self).cancel_deferred()
 
         d, self._local_deferred = self._local_deferred, None
@@ -110,7 +110,6 @@
         """
         Start the Tech-Profile Delete
         """
-        self.log.debug('function-entry')
         super(BrcmTpDeleteTask, self).start()
         if self._tcont is not None:
             self._local_deferred = reactor.callLater(0, self.delete_tcont_and_associated_me)
@@ -123,9 +122,6 @@
         """
         Shutdown Tech-Profile delete tasks
         """
-        self.log.debug('function-entry')
-        self.log.debug('stopping')
-
         self.cancel_deferred()
         super(BrcmTpDeleteTask, self).stop()
 
@@ -138,7 +134,6 @@
         :param operation: (str) what operation was being performed
         :return: True if successful, False if the entity existed (already created)
         """
-        self.log.debug('function-entry')
 
         omci_msg = results.fields['omci_message'].fields
         status = omci_msg['success_code']
@@ -162,7 +157,7 @@
 
     @inlineCallbacks
     def delete_tcont_and_associated_me(self):
-        self.log.debug('function-entry')
+        self.log.info('deleting-tcont')
 
         omci_cc = self._onu_device.omci_cc
 
@@ -213,6 +208,8 @@
 
     @inlineCallbacks
     def delete_gem_port_nw_ctp_and_associated_me(self):
+        self.log.info('deleting-gem-port-iw')
+
         omci_cc = self._onu_device.omci_cc
         try:
             ################################################################################
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py
index cca0b06..d93224a 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_tp_setup_task.py
@@ -59,16 +59,19 @@
         :param uni_id: (int) numeric id of the uni port on the onu device, starts at 0
         :param tp_table_id: (int) Technology Profile Table-ID
         """
-        log = structlog.get_logger(device_id=handler.device_id, uni_id=uni_id)
-        log.debug('function-entry')
-
         super(BrcmTpSetupTask, self).__init__(BrcmTpSetupTask.name,
                                               omci_agent,
                                               handler.device_id,
                                               priority=SETUP_TP_TASK_PRIORITY,
                                               exclusive=True)
 
-        self.log = log
+        self.log = structlog.get_logger(device_id=handler.device_id,
+                                        name=BrcmTpSetupTask.name,
+                                        task_id=self._task_id,
+                                        tconts=tconts,
+                                        gem_ports=gem_ports,
+                                        uni_id=uni_id,
+                                        tp_table_id=tp_table_id)
 
         self._onu_device = omci_agent.get_device(handler.device_id)
         self._local_deferred = None
@@ -103,7 +106,6 @@
         self.uni_port_to_queue_map = dict()
 
     def cancel_deferred(self):
-        self.log.debug('function-entry')
         super(BrcmTpSetupTask, self).cancel_deferred()
 
         d, self._local_deferred = self._local_deferred, None
@@ -117,7 +119,6 @@
         """
         Start the Tech-Profile Download
         """
-        self.log.debug('function-entry')
         super(BrcmTpSetupTask, self).start()
         self._local_deferred = reactor.callLater(0, self.perform_service_specific_steps)
 
@@ -125,9 +126,6 @@
         """
         Shutdown Tech-Profile download tasks
         """
-        self.log.debug('function-entry')
-        self.log.debug('stopping')
-
         self.cancel_deferred()
         super(BrcmTpSetupTask, self).stop()
 
@@ -140,7 +138,6 @@
         :param operation: (str) what operation was being performed
         :return: True if successful, False if the entity existed (already created)
         """
-        self.log.debug('function-entry')
 
         omci_msg = results.fields['omci_message'].fields
         status = omci_msg['success_code']
@@ -164,7 +161,7 @@
 
     @inlineCallbacks
     def perform_service_specific_steps(self):
-        self.log.debug('function-entry')
+        self.log.info('creating-tcont-mapper-gemport-iw')
 
         omci_cc = self._onu_device.omci_cc
         gem_pq_associativity = dict()
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
index 2edd43c..3884620 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
@@ -15,6 +15,7 @@
 #
 
 from __future__ import absolute_import
+import structlog
 from pyvoltha.adapters.extensions.omci.tasks.task import Task
 from twisted.internet import reactor
 from twisted.internet.defer import inlineCallbacks, failure, returnValue
@@ -51,6 +52,12 @@
                                               device_id,
                                               priority=priority,
                                               exclusive=True)
+
+        self.log = structlog.get_logger(device_id=device_id,
+                                        name=BrcmUniLockTask.name,
+                                        task_id=self._task_id,
+                                        setting_lock=lock)
+
         self._device = omci_agent.get_device(device_id)
         self._lock = lock
         self._results = None
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py
index deee947..6f704fd 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_vlan_filter_task.py
@@ -52,14 +52,20 @@
         :param tp_id: (int) TP ID for the flow
         :param priority: (int) OpenOMCI Task priority (0..255) 255 is the highest
         """
-
-        self.log = structlog.get_logger(device_id=handler.device_id, uni_port=uni_port.port_number)
-
         super(BrcmVlanFilterTask, self).__init__(BrcmVlanFilterTask.name,
                                                  omci_agent,
                                                  handler.device_id,
                                                  priority=priority,
                                                  exclusive=True)
+
+        self.log = structlog.get_logger(device_id=handler.device_id,
+                                        name=BrcmVlanFilterTask.name,
+                                        task_id=self._task_id,
+                                        entity_id=uni_port.entity_id,
+                                        uni_id=uni_port.uni_id,
+                                        uni_port=uni_port.port_number,
+                                        set_vlan_id=set_vlan_id)
+
         self._device = omci_agent.get_device(handler.device_id)
         self._uni_port = uni_port
         self._set_vlan_id = set_vlan_id
diff --git a/python/adapters/brcm_openomci_onu/onu_gem_port.py b/python/adapters/brcm_openomci_onu/onu_gem_port.py
index 5e618cc..dcde287 100644
--- a/python/adapters/brcm_openomci_onu/onu_gem_port.py
+++ b/python/adapters/brcm_openomci_onu/onu_gem_port.py
@@ -48,7 +48,6 @@
                  handler=None):
 
         self.log = structlog.get_logger(device_id=handler.device_id, uni_id=uni_id, gem_id=gem_id)
-        self.log.debug('function-entry')
 
         self.name = name
         self.gem_id = gem_id
@@ -98,39 +97,32 @@
 
     @property
     def pon_id(self):
-        self.log.debug('function-entry')
         return self._pon_id
 
     @pon_id.setter
     def pon_id(self, pon_id):
-        self.log.debug('function-entry')
         assert self._pon_id is None or self._pon_id == pon_id, 'PON-ID can only be set once'
         self._pon_id = pon_id
 
     @property
     def onu_id(self):
-        self.log.debug('function-entry')
         return self._onu_id
 
     @onu_id.setter
     def onu_id(self, onu_id):
-        self.log.debug('function-entry', onu_id=onu_id)
         assert self._onu_id is None or self._onu_id == onu_id, 'ONU-ID can only be set once'
         self._onu_id = onu_id
 
     @property
     def alloc_id(self):
-        self.log.debug('function-entry')
         return self._alloc_id
 
     @property
     def direction(self):
-        self.log.debug('function-entry')
         return self._direction
 
     @direction.setter
     def direction(self, direction):
-        self.log.debug('function-entry')
         # GEM Port CTP are configured separately in UPSTREAM and DOWNSTREAM.
         # BIDIRECTIONAL is not supported.
         assert direction == "UPSTREAM" or direction == "DOWNSTREAM" or \
@@ -146,17 +138,14 @@
 
     @property
     def tcont(self):
-        self.log.debug('function-entry')
         tcont_item = self._handler.pon_port.tconts.get(self.alloc_id)
         return tcont_item
 
     @property
     def omci_transport(self):
-        self.log.debug('function-entry')
         return self._omci_transport
 
     def to_dict(self):
-        self.log.debug('function-entry')
         return {
             'port-id': self.gem_id,
             'alloc-id': self.alloc_id,
@@ -166,22 +155,18 @@
 
     @property
     def entity_id(self):
-        self.log.debug('function-entry')
         return self._entity_id
 
     @entity_id.setter
     def entity_id(self, value):
-        self.log.debug('function-entry')
         self._entity_id = value
 
     @property
     def encryption(self):
-        self.log.debug('function-entry')
         return self._encryption
 
     @encryption.setter
     def encryption(self, value):
-        self.log.debug('function-entry')
         # FIXME The encryption should come as boolean by default
         value = eval(value)
         assert isinstance(value, bool), 'encryption is a boolean'
@@ -191,12 +176,10 @@
 
     @property
     def discard_config(self):
-        self.log.debug('function-entry')
         return self._discard_config
 
     @discard_config.setter
     def discard_config(self, discard_config):
-        self.log.debug('function-entry')
         assert isinstance(discard_config, dict), "discard_config not dict"
         assert 'max_probability' in discard_config, "max_probability missing"
         assert 'max_threshold' in discard_config, "max_threshold missing"
@@ -205,12 +188,10 @@
 
     @property
     def discard_policy(self):
-        self.log.debug('function-entry')
         return self._discard_policy
 
     @discard_policy.setter
     def discard_policy(self, discard_policy):
-        self.log.debug('function-entry')
         dp = ("TailDrop", "WTailDrop", "RED", "WRED")
         assert (isinstance(discard_policy, str))
         assert (discard_policy in dp)
@@ -218,12 +199,10 @@
 
     @property
     def max_q_size(self):
-        self.log.debug('function-entry')
         return self._max_q_size
 
     @max_q_size.setter
     def max_q_size(self, max_q_size):
-        self.log.debug('function-entry')
         if isinstance(max_q_size, str):
             assert (max_q_size == "auto")
         else:
@@ -233,12 +212,10 @@
 
     @property
     def pbit_map(self):
-        self.log.debug('function-entry')
         return self._pbit_map
 
     @pbit_map.setter
     def pbit_map(self, pbit_map):
-        self.log.debug('function-entry')
         assert (isinstance(pbit_map, str))
         assert (len(pbit_map[2:]) == 8)  # Example format of pbit_map: "0b00000101"
         try:
@@ -251,12 +228,10 @@
 
     @property
     def scheduling_policy(self):
-        self.log.debug('function-entry')
         return self._scheduling_policy
 
     @scheduling_policy.setter
     def scheduling_policy(self, scheduling_policy):
-        self.log.debug('function-entry')
         sp = ("WRR", "StrictPriority")
         assert (isinstance(scheduling_policy, str))
         assert (scheduling_policy in sp)
@@ -264,8 +239,6 @@
 
     @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'],
                           uni_id=gem_port['uni_id'],
@@ -344,7 +317,6 @@
 
     @inlineCallbacks
     def remove_from_hardware(self, omci):
-        self.log.debug('function-entry', omci=omci)
         self.log.debug('remove-from-hardware', gem_id=self.gem_id)
 
         try:
@@ -370,7 +342,6 @@
         returnValue(results)
 
     def check_status_and_state(self, results, operation=''):
-        self.log.debug('function-entry')
         omci_msg = results.fields['omci_message'].fields
         status = omci_msg['success_code']
         error_mask = omci_msg.get('parameter_error_attributes_mask', 'n/a')
diff --git a/python/adapters/brcm_openomci_onu/onu_tcont.py b/python/adapters/brcm_openomci_onu/onu_tcont.py
index bc1f230..da639d3 100644
--- a/python/adapters/brcm_openomci_onu/onu_tcont.py
+++ b/python/adapters/brcm_openomci_onu/onu_tcont.py
@@ -40,7 +40,6 @@
     def __init__(self, handler, uni_id, alloc_id, q_sched_policy, traffic_descriptor):
 
         self.log = structlog.get_logger(device_id=handler.device_id, uni_id=uni_id, alloc_id=alloc_id)
-        self.log.debug('function-entry')
 
         self.uni_id = uni_id
         self.alloc_id = alloc_id
@@ -60,12 +59,10 @@
 
     @property
     def entity_id(self):
-        self.log.debug('function-entry')
         return self._entity_id
 
     @property
     def q_sched_policy(self):
-        self.log.debug('function-entry')
         return self._q_sched_policy
 
     @q_sched_policy.setter
@@ -78,8 +75,6 @@
 
     @staticmethod
     def create(handler, tcont, td):
-        log = structlog.get_logger(tcont=tcont, td=td)
-        log.debug('function-entry', tcont=tcont)
 
         return OnuTCont(handler,
                         tcont['uni_id'],
@@ -112,7 +107,6 @@
 
     @inlineCallbacks
     def remove_from_hardware(self, omci):
-        self.log.debug('function-entry', omci=omci)
         self.log.debug('remove-from-hardware', tcont_entity_id=self.entity_id)
 
         # Release tcont by setting alloc_id=0xFFFF
@@ -138,7 +132,6 @@
         returnValue(results)
 
     def check_status_and_state(self, results, operation=''):
-        self.log.debug('function-entry')
         omci_msg = results.fields['omci_message'].fields
         status = omci_msg['success_code']
         error_mask = omci_msg.get('parameter_error_attributes_mask', 'n/a')
diff --git a/python/adapters/brcm_openomci_onu/onu_traffic_descriptor.py b/python/adapters/brcm_openomci_onu/onu_traffic_descriptor.py
index 1391e75..0e8820d 100644
--- a/python/adapters/brcm_openomci_onu/onu_traffic_descriptor.py
+++ b/python/adapters/brcm_openomci_onu/onu_traffic_descriptor.py
@@ -34,7 +34,6 @@
                  name=None):
 
         self.log = structlog.get_logger(fixed=fixed, assured=assured, maximum=maximum, additional=additional)
-        self.log.debug('function-entry')
 
         self.name = name
         self.fixed_bandwidth = fixed       # bps
@@ -47,8 +46,6 @@
 
     @staticmethod
     def to_string(value):
-        log = structlog.get_logger()
-        log.debug('function-entry', value=value)
         return {
             NON_ASSURED_SHARING: "non-assured-sharing",
             BEST_EFFORT_SHARING: "best-effort-sharing",
@@ -58,8 +55,6 @@
 
     @staticmethod
     def from_value(value):
-        log = structlog.get_logger()
-        log.debug('function-entry', value=value)
         return {
             0: NONE,
             1: BEST_EFFORT_SHARING,
@@ -68,14 +63,12 @@
 
 
     def __str__(self):
-        self.log.debug('function-entry')
         return "OnuTrafficDescriptor: {}, {}/{}/{}".format(self.name,
                                                         self.fixed_bandwidth,
                                                         self.assured_bandwidth,
                                                         self.maximum_bandwidth)
 
     def to_dict(self):
-        self.log.debug('function-entry')
         val = {
             'fixed-bandwidth': self.fixed_bandwidth,
             'assured-bandwidth': self.assured_bandwidth,
@@ -87,8 +80,6 @@
 
     @staticmethod
     def create(traffic_disc):
-        log = structlog.get_logger()
-        log.debug('function-entry',traffic_disc=traffic_disc)
 
         additional = OnuTrafficDescriptor.from_value(
             traffic_disc['additional-bw-eligibility-indicator'])
@@ -105,7 +96,6 @@
 
     @inlineCallbacks
     def add_to_hardware(self, omci):
-       self.log.debug('function-entry', omci=omci)
        results = succeed('TODO: Implement me')
        returnValue(results)
 
diff --git a/python/adapters/brcm_openomci_onu/pon_port.py b/python/adapters/brcm_openomci_onu/pon_port.py
index e8eb38d..f644ec8 100644
--- a/python/adapters/brcm_openomci_onu/pon_port.py
+++ b/python/adapters/brcm_openomci_onu/pon_port.py
@@ -34,7 +34,6 @@
 
     def __init__(self, handler, port_no):
         self.log = structlog.get_logger(device_id=handler.device_id, port_no=port_no)
-        self.log.debug('function-entry')
 
         self._enabled = False
         self._valid = True
@@ -63,14 +62,11 @@
 
     @staticmethod
     def create(handler, port_no):
-        log = structlog.get_logger(device_id=handler.device_id, port_no=port_no)
-        log.debug('function-entry')
         port = PonPort(handler, port_no)
 
         return port
 
     def _start(self):
-        self.log.debug('function-entry')
         self._cancel_deferred()
 
         self._admin_state = AdminState.ENABLED
@@ -78,7 +74,6 @@
         self._update_adapter_agent()
 
     def _stop(self):
-        self.log.debug('function-entry')
         self._cancel_deferred()
 
         self._admin_state = AdminState.DISABLED
@@ -88,7 +83,6 @@
         # TODO: stop h/w sync
 
     def _cancel_deferred(self):
-        self.log.debug('function-entry')
         d1, self._deferred = self._deferred, None
 
         for d in [d1]:
@@ -99,19 +93,16 @@
                 pass
 
     def delete(self):
-        self.log.debug('function-entry')
         self.enabled = False
         self._valid = False
         self._handler = None
 
     @property
     def enabled(self):
-        self.log.debug('function-entry')
         return self._enabled
 
     @enabled.setter
     def enabled(self, value):
-        self.log.debug('function-entry')
         if self._enabled != value:
             self._enabled = value
 
@@ -122,17 +113,14 @@
 
     @property
     def port_number(self):
-        self.log.debug('function-entry')
         return self._port_number
 
     @property
     def tconts(self):
-        self.log.debug('function-entry')
         return self._tconts
 
     @property
     def gem_ports(self):
-        self.log.debug('function-entry')
         return self._gem_ports
 
     def get_port(self):
@@ -140,7 +128,6 @@
         Get the VOLTHA PORT object for this port
         :return: VOLTHA Port object
         """
-        self.log.debug('function-entry')
 
         self._port = Port(port_no=self.port_number,
                           label='PON port',
@@ -160,7 +147,6 @@
         """
         Update the port status and state in the core
         """
-        self.log.debug('function-entry')
         self.log.debug('update-adapter-agent', admin_state=self._admin_state,
                        oper_status=self._oper_status)
 
@@ -183,7 +169,6 @@
         :param reflow: (boolean) If true, force add (used during h/w resync)
         :return: (deferred)
         """
-        self.log.debug('function-entry', tcont=tcont.alloc_id)
 
         if not self._valid:
             return  # Deleting
@@ -195,7 +180,6 @@
         self._tconts[tcont.alloc_id] = tcont
 
     def update_tcont_td(self, alloc_id, new_td):
-        self.log.debug('function-entry')
 
         tcont = self._tconts.get(alloc_id)
 
@@ -216,7 +200,6 @@
 
     @inlineCallbacks
     def remove_tcont(self, alloc_id, remove_from_hw=True):
-        self.log.debug('function-entry')
 
         tcont = self._tconts.get(alloc_id)
 
@@ -234,13 +217,11 @@
             raise
 
     def gem_port(self, gem_id, direction):
-        self.log.debug('function-entry')
         return self._gem_ports.get((gem_id, direction))
 
     @property
     def gem_ids(self):
         """Get all GEM Port IDs used by this ONU"""
-        self.log.debug('function-entry')
         return sorted([gem_id_and_direction[0] for gem_id_and_direction, gem in self._gem_ports.items()])
 
     def add_gem_port(self, gem_port, reflow=False):
@@ -251,7 +232,6 @@
         :param reflow: (boolean) If true, force add (used during h/w resync)
         :return: (deferred)
         """
-        self.log.debug('function-entry', gem_port=gem_port.gem_id)
 
         if not self._valid:
             return  # Deleting
@@ -274,7 +254,6 @@
         :param remove_from_hw: Remove the GemPort from hardware (remove if True else not)
         :return: deferred
         """
-        self.log.debug('function-entry', gem_id=gem_id)
 
         gem_port = self._gem_ports.get((gem_id, direction))
 
diff --git a/python/adapters/brcm_openomci_onu/uni_port.py b/python/adapters/brcm_openomci_onu/uni_port.py
index 99d42cd..d42bf84 100644
--- a/python/adapters/brcm_openomci_onu/uni_port.py
+++ b/python/adapters/brcm_openomci_onu/uni_port.py
@@ -18,11 +18,6 @@
 from enum import Enum
 from voltha_protos.common_pb2 import OperStatus, AdminState
 from voltha_protos.device_pb2 import Port
-from voltha_protos.openflow_13_pb2 import OFPPF_10GB_FD
-from pyvoltha.common.utils.nethelpers import mac_str_to_tuple
-from voltha_protos.logical_device_pb2 import LogicalPort
-from voltha_protos.openflow_13_pb2 import OFPPS_LIVE, OFPPF_FIBER, OFPPS_LINK_DOWN
-from voltha_protos.openflow_13_pb2 import ofp_port
 
 class UniType(Enum):
     """
diff --git a/python/docker/Dockerfile.openonu_adapter b/python/docker/Dockerfile.openonu_adapter
index f21cc9f..c536ff7 100644
--- a/python/docker/Dockerfile.openonu_adapter
+++ b/python/docker/Dockerfile.openonu_adapter
@@ -38,6 +38,14 @@
 ARG org_label_schema_vcs_ref=unknown
 ARG org_label_schema_build_date=unknown
 ARG org_opencord_vcs_commit_date=unknown
+ARG org_opencord_vcs_dirty=unknown
+
+RUN echo '[buildinfo]\n\
+version='$org_label_schema_version'\n\
+vcs_ref='$org_label_schema_vcs_ref'\n\
+vcs_dirty='$org_opencord_vcs_dirty'\n\
+build_time='$org_label_schema_build_date'\n '\
+> /voltha/adapters/brcm_openomci_onu/BUILDINFO
 
 LABEL org.label-schema.schema-version=1.0 \
       org.label-schema.name=voltha-openonu-adapter \
diff --git a/python/requirements.txt b/python/requirements.txt
index e67e469..a7a5fce 100644
--- a/python/requirements.txt
+++ b/python/requirements.txt
@@ -1,2 +1,2 @@
 voltha-protos==2.1.2
-pyvoltha==2.3.6
+pyvoltha==2.3.7