From c311e8c25f9f475b1bd42af6b1707571de104638 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sat, 19 Oct 2013 10:39:24 +1100 Subject: [PATCH] Remove SERVICE_TOKEN and SERVICE_ENDPOINT env vars From the code itself: deprecated command line options for essex compatibility. To be removed in Grizzly release cycle. so this patch removes these deprecated env vars that have been moved into the OS_* namespace since Folsom, and updates the tests that probably should have been using the non-deprecated option anyway :) The fact these are still in there are causing some confusion, we actually had a bug report over in docs claiming OS_SERVICE_TOKEN should be replaced with SERVICE_TOKEN! Change-Id: I205748be225dbacc3a528724cf3722d8bf7f8d9f --- keystoneclient/shell.py | 14 -------------- keystoneclient/tests/test_shell.py | 4 ++-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/keystoneclient/shell.py b/keystoneclient/shell.py index 97da3116d..c3a709f14 100644 --- a/keystoneclient/shell.py +++ b/keystoneclient/shell.py @@ -243,20 +243,6 @@ class OpenStackIdentityShell(object): "network delays. Default is %s seconds." % ( access.STALE_TOKEN_DURATION)) - #FIXME(heckj): - # deprecated command line options for essex compatibility. To be - # removed in Grizzly release cycle. - parser.add_argument('--token', - metavar='', - dest='os_token', - default=env('SERVICE_TOKEN'), - help=argparse.SUPPRESS) - parser.add_argument('--endpoint', - dest='os_endpoint', - metavar='', - default=env('SERVICE_ENDPOINT'), - help=argparse.SUPPRESS) - return parser def get_subcommand_parser(self, version): diff --git a/keystoneclient/tests/test_shell.py b/keystoneclient/tests/test_shell.py index 8c9c06fae..e4b999b7f 100644 --- a/keystoneclient/tests/test_shell.py +++ b/keystoneclient/tests/test_shell.py @@ -132,12 +132,12 @@ class ShellTest(utils.TestCase): def test_token_no_endpoint(self): with testtools.ExpectedException( exceptions.CommandError, 'Expecting an endpoint provided'): - self.shell('--token=%s user-list' % uuid.uuid4().hex) + self.shell('--os-token=%s user-list' % uuid.uuid4().hex) def test_endpoint_no_token(self): with testtools.ExpectedException( exceptions.CommandError, 'Expecting a token provided'): - self.shell('--endpoint=http://10.0.0.1:5000/v2.0/ user-list') + self.shell('--os-endpoint=http://10.0.0.1:5000/v2.0/ user-list') def test_shell_args(self): do_tenant_mock = mock.MagicMock()