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
This commit is contained in:
Tom Fifield
2013-10-19 10:39:24 +11:00
parent 876c2d6c2a
commit c311e8c25f
2 changed files with 2 additions and 16 deletions

View File

@@ -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='<service-token>',
dest='os_token',
default=env('SERVICE_TOKEN'),
help=argparse.SUPPRESS)
parser.add_argument('--endpoint',
dest='os_endpoint',
metavar='<service-endpoint>',
default=env('SERVICE_ENDPOINT'),
help=argparse.SUPPRESS)
return parser
def get_subcommand_parser(self, version):

View File

@@ -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()