Merge "fixed typos found by RETF rules"

This commit is contained in:
Jenkins 2014-05-03 21:42:31 +00:00 committed by Gerrit Code Review
commit 570a9dc22d
16 changed files with 24 additions and 23 deletions

View File

@ -249,7 +249,7 @@ class TokenMethod(AuthMethod):
_method_parameters = ['token']
def __init__(self, **kwargs):
"""Construct a Auth plugin to fetch a token from a token.
"""Construct an Auth plugin to fetch a token from a token.
:param string token: Token for authentication.
"""

View File

@ -57,7 +57,7 @@ def filter_kwargs(f):
id_value = getid(ref)
if id_value != ref:
# If an object with an id was passed, then use the id, e.g:
# If an object with an id was passed, then use the id, e.g.:
# user: user(id=1) becomes user_id: 1
key = '%s_id' % key

View File

@ -425,8 +425,9 @@ class Discover(object):
version = _normalize_version_number(version)
for keystone_version in six.itervalues(versions):
# major versions must be the same (eg even though v2 is a lower
# version than v3 we can't use it if v2 was requested)
# major versions must be the same (e.g. even though v2
# is a lower version than v3 we can't use it if v2 was
# requested)
if version[0] != keystone_version.version[0]:
continue

View File

@ -221,7 +221,7 @@ opts = [
default=None,
help='Complete admin Identity API endpoint. This should '
'specify the unversioned root endpoint '
'eg. https://localhost:35357/'),
'e.g. https://localhost:35357/'),
cfg.StrOpt('auth_version',
default=None,
help='API version of the admin Identity API endpoint'),

View File

@ -61,7 +61,7 @@ def split_path(path, minsegs=1, maxsegs=None, rest_with_last=False):
:param rest_with_last: If True, trailing data will be returned as part
of last segment. If False, and there is
trailing data, raises ValueError.
:returns: list of segments with a length of maxsegs (non-existant
:returns: list of segments with a length of maxsegs (non-existent
segments will return as None)
:raises: ValueError if given an invalid path
"""
@ -183,7 +183,7 @@ class S3Token(object):
token = req.headers.get('X-Auth-Token',
req.headers.get('X-Storage-Token'))
if not token:
msg = 'You did not specify a auth or a storage token. skipping.'
msg = 'You did not specify an auth or a storage token. skipping.'
self.logger.debug(msg)
return self.app(environ, start_response)

View File

@ -30,7 +30,7 @@ class ServiceCatalog(object):
@classmethod
def factory(cls, resource_dict, token=None, region_name=None):
"""Create ServiceCatalog object given a auth token."""
"""Create ServiceCatalog object given an auth token."""
if ServiceCatalogV3.is_valid(resource_dict):
return ServiceCatalogV3(token, resource_dict, region_name)
elif ServiceCatalogV2.is_valid(resource_dict):

View File

@ -129,7 +129,7 @@ class Session(object):
provided such that the base URL can be determined.
If a fully qualified URL is provided then
endpoint_filter will be ignored.
:param string method: The http method to use. (eg. 'GET', 'POST')
:param string method: The http method to use. (e.g. 'GET', 'POST')
:param string original_ip: Mark this request as forwarded for this ip.
(optional)
:param dict headers: Headers to be included in the request. (optional)
@ -186,7 +186,7 @@ class Session(object):
headers['X-Auth-Token'] = token
# if we are passed a fully qualified URL and a endpoint_filter we
# if we are passed a fully qualified URL and an endpoint_filter we
# should ignore the filter. This will make it easier for clients who
# want to overrule the default endpoint_filter data added to all client
# requests. We check fully qualified here by the presence of a host.

View File

@ -1278,7 +1278,7 @@ class v2AuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest,
tenant
The tests below were originally part of the generic AuthTokenMiddlewareTest
class, but now, since they really are v2 specifc, they are included here.
class, but now, since they really are v2 specific, they are included here.
"""
@ -1440,7 +1440,7 @@ class v3AuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest,
"""Test auth_token middleware with v3 tokens.
Re-execute the AuthTokenMiddlewareTest class tests, but with the
the auth_token middleware configured to expect v3 tokens back from
auth_token middleware configured to expect v3 tokens back from
a keystone server.
This is done by configuring the AuthTokenMiddlewareTest class via

View File

@ -570,7 +570,7 @@ class DiscoverUtils(utils.TestCase):
versionRaises('hello')
versionRaises('1.a')
versionRaises('vaccuum')
versionRaises('vacuum')
def test_keystone_version_objects(self):
v31s = discover._KeystoneVersion((3, 1), 'stable')

View File

@ -264,7 +264,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
self.assertEqual(httpretty.last_request().headers.get('X-Auth-Token'),
fake_token)
# if we clear that overriden token then we fall back to the original
# if we clear that overridden token then we fall back to the original
del cl.auth_token
resp, body = cl.get(fake_url)

View File

@ -79,7 +79,7 @@ class TenantTests(utils.TestCase):
req_body['tenant']['description'],
req_body['tenant']['enabled'],
extravalue01=req_body['tenant']['extravalue01'],
name="dont overwrite priors")
name="don't overwrite priors")
self.assertIsInstance(tenant, tenants.Tenant)
self.assertEqual(tenant.id, 4)
self.assertEqual(tenant.name, "tenantX")
@ -188,7 +188,7 @@ class TenantTests(utils.TestCase):
req_body['tenant']['description'],
req_body['tenant']['enabled'],
extravalue01=req_body['tenant']['extravalue01'],
name="dont overwrite priors")
name="don't overwrite priors")
self.assertIsInstance(tenant, tenants.Tenant)
self.assertRequestBodyIs(json=req_body)
self.assertEqual(tenant.id, 4)

View File

@ -359,7 +359,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
self.assertEqual(httpretty.last_request().headers.get('X-Auth-Token'),
fake_token)
# if we clear that overriden token then we fall back to the original
# if we clear that overridden token then we fall back to the original
del cl.auth_token
resp, body = cl.get(fake_url)

View File

@ -70,7 +70,7 @@ class IdentityProviderTests(utils.TestCase, utils.CrudTests):
# req_ref argument allows you to specify a different
# signature for the request when the manager does some
# conversion before doing the request (e.g converting
# conversion before doing the request (e.g. converting
# from datetime object to timestamp string)
req_ref = (req_ref or ref).copy()
req_ref.pop('id')
@ -110,7 +110,7 @@ class MappingTests(utils.TestCase, utils.CrudTests):
# req_ref argument allows you to specify a different
# signature for the request when the manager does some
# conversion before doing the request (e.g converting
# conversion before doing the request (e.g. converting
# from datetime object to timestamp string)
req_ref = (req_ref or ref).copy()

View File

@ -194,7 +194,7 @@ class CrudTests(object):
# req_ref argument allows you to specify a different
# signature for the request when the manager does some
# conversion before doing the request (e.g converting
# conversion before doing the request (e.g. converting
# from datetime object to timestamp string)
req_ref = (req_ref or ref).copy()
req_ref.pop('id')
@ -305,7 +305,7 @@ class CrudTests(object):
# req_ref argument allows you to specify a different
# signature for the request when the manager does some
# conversion before doing the request (e.g converting
# conversion before doing the request (e.g. converting
# from datetime object to timestamp string)
req_ref = (req_ref or ref).copy()
req_ref.pop('id')

View File

@ -65,7 +65,7 @@ def print_list(objs, fields, formatters={}, order_by=None):
def _word_wrap(string, max_length=0):
"""wrap long strings to be no longer then max_length."""
"""wrap long strings to be no longer than max_length."""
if max_length <= 0:
return string
return '\n'.join([string[i:i + max_length] for i in

View File

@ -385,7 +385,7 @@ def do_user_role_list(kc, args):
'the authenticated user will be used.')
@utils.arg('--user_id', help=argparse.SUPPRESS)
@utils.arg('--tenant-id', metavar='<tenant-id>',
help='Tenant ID for which to to create credentials. If not '
help='Tenant ID for which to create credentials. If not '
'specified, the authenticated tenant ID will be used.')
@utils.arg('--tenant_id', help=argparse.SUPPRESS)
def do_ec2_credentials_create(kc, args):