From d37b847977fbc2ffcc76d89031826c934ea211af Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Fri, 29 Apr 2016 18:02:01 +0300 Subject: [PATCH] Issue deprecation message for the barbican CLI The barbican CLI has been deprecated and users should use the openstack unified CLI instead. Change-Id: Ie78b2c913b1520f1df312ab7a11e0132f0c36d26 --- barbicanclient/barbican.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/barbicanclient/barbican.py b/barbicanclient/barbican.py index fc0b1e5b..87abec14 100644 --- a/barbicanclient/barbican.py +++ b/barbicanclient/barbican.py @@ -17,8 +17,9 @@ Command-line interface to the Barbican API. """ -import sys from collections import namedtuple +import logging +import sys from cliff import app from cliff import command @@ -34,6 +35,9 @@ from barbicanclient import client from barbicanclient import version +LOG = logging.getLogger(__name__) + + _DEFAULT_IDENTITY_API_VERSION = '3' _IDENTITY_API_VERSION_2 = ['2', '2.0'] _IDENTITY_API_VERSION_3 = ['3'] @@ -335,6 +339,10 @@ class Barbican(app.App): def main(argv=sys.argv[1:]): + logging.basicConfig() + LOG.warning("This Barbican CLI interface has been deprecated and will be " + "removed in the O release. Please use the openstack unified " + "client instead.") barbican_app = Barbican() return barbican_app.run(argv)