VOL-1342:
1) Fix etcd KV store inter-working for Tech-Profile
2) Fix logging issues as a result of new logging framework changes

Change-Id: I0dc4740c9cec4927d2af2ba873163dbfbf524567
diff --git a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
index 6453d52..a347392 100644
--- a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
+++ b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
@@ -51,6 +51,7 @@
 from voltha.adapters.brcm_openomci_onu.pon_port import *
 from voltha.adapters.brcm_openomci_onu.uni_port import *
 from voltha.adapters.brcm_openomci_onu.onu_traffic_descriptor import *
+from common.tech_profile.tech_profile import TechProfile
 
 OP = EntityOperations
 RC = ReasonCodes
@@ -113,10 +114,12 @@
         self.args = registry('main').get_args()
         if self.args.backend == 'etcd':
             host, port = self.args.etcd.split(':', 1)
-            self.kv_client = EtcdStore(host, port, '.')
+            self.kv_client = EtcdStore(host, port,
+                                       TechProfile.KV_STORE_TECH_PROFILE_PATH_PREFIX)
         elif self.args.backend == 'consul':
             host, port = self.args.consul.split(':', 1)
-            self.kv_client = ConsulStore(host, port, '.')
+            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")
diff --git a/voltha/adapters/brcm_openomci_onu/omci/brcm_tp_service_specific_task.py b/voltha/adapters/brcm_openomci_onu/omci/brcm_tp_service_specific_task.py
index 2425693..26f7c66 100644
--- a/voltha/adapters/brcm_openomci_onu/omci/brcm_tp_service_specific_task.py
+++ b/voltha/adapters/brcm_openomci_onu/omci/brcm_tp_service_specific_task.py
@@ -146,7 +146,7 @@
         failed_mask = omci_msg.get('failed_attributes_mask', 'n/a')
         unsupported_mask = omci_msg.get('unsupported_attributes_mask', 'n/a')
 
-        self.log.debug("OMCI Result:", operation, omci_msg=omci_msg, status=status, error_mask=error_mask,
+        self.log.debug("OMCI Result: %s", operation, omci_msg=omci_msg, status=status, error_mask=error_mask,
                        failed_mask=failed_mask, unsupported_mask=unsupported_mask)
 
         if status == RC.Success:
@@ -344,7 +344,7 @@
                 interwork_tp_pointers=gem_entity_ids  # Interworking TP IDs
             )
             frame = msg.set()
-            self.log.debug('openomci-msg', msg=msg)
+            self.log.debug('openomci-msg', omci_msg=msg)
             results = yield omci_cc.send(frame)
             self.check_status_and_state(results, 'set-8021p-mapper-service-profile-ul')
 
@@ -386,7 +386,7 @@
             )
 
             frame = msg.create()
-            self.log.debug('openomci-msg', msg=msg)
+            self.log.debug('openomci-msg', omci_msg=msg)
             results = yield omci_cc.send(frame)
             self.check_status_and_state(results, 'create-extended-vlan-tagging-operation-configuration-data')
 
@@ -404,7 +404,7 @@
             )
 
             frame = msg.set()
-            self.log.debug('openomci-msg', msg=msg)
+            self.log.debug('openomci-msg', omci_msg=msg)
             results = yield omci_cc.send(frame)
             self.check_status_and_state(results, 'set-extended-vlan-tagging-operation-configuration-data')
 
@@ -445,7 +445,7 @@
             )
 
             frame = msg.set()
-            self.log.debug('openomci-msg', msg=msg)
+            self.log.debug('openomci-msg', omci_msg=msg)
             results = yield omci_cc.send(frame)
             self.check_status_and_state(results, 'set-extended-vlan-tagging-operation-configuration-data-table')
 
diff --git a/voltha/adapters/openolt/openolt_flow_mgr.py b/voltha/adapters/openolt/openolt_flow_mgr.py
index 7e6c258..8669d32 100644
--- a/voltha/adapters/openolt/openolt_flow_mgr.py
+++ b/voltha/adapters/openolt/openolt_flow_mgr.py
@@ -70,7 +70,6 @@
 PUSH_VLAN = 'push_vlan'
 TRAP_TO_HOST = 'trap_to_host'
 
-KV_STORE_TECH_PROFILE_PATH_PREFIX = 'voltha/technology_profiles'
 
 
 class OpenOltFlowMgr(object):
@@ -386,8 +385,10 @@
 
                     # FIXME Should get Table id form the flow, as of now hardcoded to
                     # DEFAULT_TECH_PROFILE_TABLE_ID (64)
-                    tp_path = KV_STORE_TECH_PROFILE_PATH_PREFIX + '/' + \
-                              self.tech_profile[intf_id]. \
+                    # 'tp_path' contains the suffix part of the tech_profile_instance path.
+                    # The prefix to the 'tp_path' should be set to \
+                    # TechProfile.KV_STORE_TECH_PROFILE_PATH_PREFIX by the ONU adapter.
+                    tp_path = self.tech_profile[intf_id]. \
                                   get_tp_path(DEFAULT_TECH_PROFILE_TABLE_ID,
                                               ofp_port_name)