From e5a76f63f46bca2b81a02cfd07d96c93c624b73d Mon Sep 17 00:00:00 2001
From: Tang Chen <chen.tang@easystack.cn>
Date: Fri, 24 Jun 2016 13:36:37 +0800
Subject: [PATCH] Use osc-lib instead of openstackclient

osc-lib is a package of common support modules for writing
OSC plugins. All common functions, classes such as exceptions,
utils, logs and so on have been moved from openstackclient to
osc-lib.

So use osc-lib instead of openstackclient.

Change-Id: I4377951ba0b58ea94a43c688b66c0b87dda7225d
---
 designateclient/osc/plugin.py   | 3 ++-
 designateclient/v2/cli/zones.py | 2 +-
 requirements.txt                | 1 +
 test-requirements.txt           | 1 -
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/designateclient/osc/plugin.py b/designateclient/osc/plugin.py
index 90fded4e..36de79ce 100644
--- a/designateclient/osc/plugin.py
+++ b/designateclient/osc/plugin.py
@@ -13,7 +13,8 @@
 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 # License for the specific language governing permissions and limitations
 # under the License.
-from openstackclient.common import utils as oscutils
+
+from osc_lib import utils as oscutils
 
 from designateclient import shell
 
diff --git a/designateclient/v2/cli/zones.py b/designateclient/v2/cli/zones.py
index 87940c66..bc0e93dd 100644
--- a/designateclient/v2/cli/zones.py
+++ b/designateclient/v2/cli/zones.py
@@ -19,7 +19,7 @@ import logging
 from cliff import command
 from cliff import lister
 from cliff import show
-from openstackclient.common import exceptions as osc_exc
+from osc_lib import exceptions as osc_exc
 import six
 
 from designateclient import utils
diff --git a/requirements.txt b/requirements.txt
index 1f019494..04baebea 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,6 +3,7 @@
 # process, which may cause wedges in the gate later.
 cliff!=1.16.0,!=1.17.0,>=1.15.0 # Apache-2.0
 jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT
+osc-lib>=0.1.0 # Apache-2.0
 oslo.utils>=3.11.0 # Apache-2.0
 pbr>=1.6 # Apache-2.0
 keystoneauth1>=2.7.0 # Apache-2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index 168e663f..802f4f88 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -7,7 +7,6 @@ coverage>=3.6 # Apache-2.0
 mock>=2.0 # BSD
 discover # BSD
 oslotest>=1.10.0 # Apache-2.0
-python-openstackclient>=2.1.0 # Apache-2.0
 python-subunit>=0.0.18 # Apache-2.0/BSD
 requests-mock>=0.7.0 # Apache-2.0
 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD