VOL-1233: Change pon resource manager to use blocking KV client library
VOL-1232: PON Resource Manager allocates same alloc id across different pon ports, and is not acceptable by asfvolt16 platform
VOL-1245: When OpenOlt device is delete, there is Unhandled error during the deletion of child brcm_openomci ONUs

Change-Id: I3f939cb12e0456b2014a133968a77fba1c4c6e63
diff --git a/common/pon_resource_manager/resource_kv_store.py b/common/pon_resource_manager/resource_kv_store.py
index 0ccbed8..a1a5c14 100644
--- a/common/pon_resource_manager/resource_kv_store.py
+++ b/common/pon_resource_manager/resource_kv_store.py
@@ -21,7 +21,7 @@
 from voltha.core.config.config_backend import EtcdStore

 

 # KV store uses this prefix to store resource info

-PATH_PREFIX = 'resource_manager/{}/{}'

+PATH_PREFIX = 'resource_manager/{}'

 

 

 class ResourceKvStore(object):

@@ -44,14 +44,12 @@
         # logger

         self._log = structlog.get_logger()

 

-        path = PATH_PREFIX.format(technology, device_id)

+        path = PATH_PREFIX.format(technology)

         try:

             if backend == 'consul':

                 self._kv_store = ConsulStore(host, port, path)

-                self._recurse = '?recurse'

             elif backend == 'etcd':

                 self._kv_store = EtcdStore(host, port, path)

-                self._recurse = ''

             else:

                 self._log.error('Invalid-backend')

                 raise Exception("Invalid-backend-for-kv-store")

@@ -99,7 +97,6 @@
 

         :param path: path to remove the resource

         """

-        path = path + self._recurse

         try:

             del self._kv_store[path]

             self._log.debug("Resource-deleted-in-kv-store", path=path)