VOL-1101: Implement a Twisted Python shim layer to interface with any KV store
- Moved methods get, list, put, delete, reserve, renew_reservation,
  release_reservation, and release_all_reservations from each of the
  implementation classes to the parent KVClient.
- Did not move method _op_with_retry because it invokes different
  target methods and handles different target exceptions, where
  the target is Etcd or Consul.

Change-Id: I7c5c06ab5d554e17b8f7658b9b11b22cb8e492d8
diff --git a/common/kvstore/consul_client.py b/common/kvstore/consul_client.py
index 825d673..bc14759 100644
--- a/common/kvstore/consul_client.py
+++ b/common/kvstore/consul_client.py
@@ -1,4 +1,4 @@
-# Copyright 2017-present Open Networking Foundation
+# Copyright 2018-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.
@@ -28,47 +28,6 @@
         KVClient.__init__(self, kv_host, kv_port)
         self.session_id = None
         self.client = Consul(kv_host, kv_port)
-        self.watcher = None
-
-    @inlineCallbacks
-    def get(self, key, timeout=DEFAULT_TIMEOUT):
-        result = yield self._op_with_retry('GET', key, None, timeout)
-        returnValue(result)
-
-    @inlineCallbacks
-    def list(self, key, timeout=DEFAULT_TIMEOUT):
-        result = yield self._op_with_retry('LIST', key, None, timeout)
-        returnValue(result)
-
-    @inlineCallbacks
-    def put(self, key, value, timeout=DEFAULT_TIMEOUT):
-        _, err = yield self._op_with_retry('PUT', key, value, timeout)
-        returnValue(err)
-
-    @inlineCallbacks
-    def delete(self, key, timeout=DEFAULT_TIMEOUT):
-        _, err = yield self._op_with_retry('DELETE', key, None, timeout)
-        returnValue(err)
-
-    @inlineCallbacks
-    def reserve(self, key, value, ttl, timeout=DEFAULT_TIMEOUT):
-        result = yield self._op_with_retry('RESERVE', key, value, timeout, ttl=ttl)
-        returnValue(result)
-
-    @inlineCallbacks
-    def renew_reservation(self, key, timeout=DEFAULT_TIMEOUT):
-        result, err = yield self._op_with_retry('RENEW', key, None, timeout)
-        returnValue(err)
-
-    @inlineCallbacks
-    def release_reservation(self, key, timeout=DEFAULT_TIMEOUT):
-        result, err = yield self._op_with_retry('RELEASE', key, None, timeout)
-        returnValue(err)
-
-    @inlineCallbacks
-    def release_all_reservations(self, timeout=DEFAULT_TIMEOUT):
-        result, err = yield self._op_with_retry('RELEASE-ALL', None, None, timeout)
-        returnValue(err)
 
     def watch(self, key, key_change_callback, timeout=DEFAULT_TIMEOUT):
         self._retriggering_watch(key, key_change_callback, timeout)