Merge "Fix doc build errors"

This commit is contained in:
Jenkins
2014-03-17 12:05:43 +00:00
committed by Gerrit Code Review
9 changed files with 43 additions and 35 deletions

View File

@@ -16,7 +16,7 @@ Contents:
using-api-v2 using-api-v2
using-api-v3 using-api-v3
api/autoindex api/modules
Contributing Contributing
============ ============

View File

@@ -171,18 +171,21 @@ def is_ans1_token(token):
thx to ayoung for sorting this out. thx to ayoung for sorting this out.
base64 decoded hex representation of MII is 3082 base64 decoded hex representation of MII is 3082::
In [3]: binascii.hexlify(base64.b64decode('MII=')) In [3]: binascii.hexlify(base64.b64decode('MII='))
Out[3]: '3082' Out[3]: '3082'
re: http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf re: http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
::
pg4: For tags from 0 to 30 the first octet is the identfier pg4: For tags from 0 to 30 the first octet is the identfier
pg10: Hex 30 means sequence, followed by the length of that sequence. pg10: Hex 30 means sequence, followed by the length of that sequence.
pg5: Second octet is the length octet pg5: Second octet is the length octet
first bit indicates short or long form, next 7 bits encode the number first bit indicates short or long form, next 7 bits encode the
of subsequent octets that make up the content length octets as an number of subsequent octets that make up the content length octets
unsigned binary int as an unsigned binary int
82 = 10000010 (first bit indicates long form) 82 = 10000010 (first bit indicates long form)
0000010 = 2 octets of content length 0000010 = 2 octets of content length
@@ -191,6 +194,9 @@ def is_ans1_token(token):
In the case of a very large content length there could be a requirement to In the case of a very large content length there could be a requirement to
have more than 2 octets to designate the content length, therefore have more than 2 octets to designate the content length, therefore
requiring us to check for MIM, MIQ, etc. requiring us to check for MIM, MIQ, etc.
::
In [4]: base64.b64encode(binascii.a2b_hex('3083')) In [4]: base64.b64encode(binascii.a2b_hex('3083'))
Out[4]: 'MIM=' Out[4]: 'MIM='
In [5]: base64.b64encode(binascii.a2b_hex('3084')) In [5]: base64.b64encode(binascii.a2b_hex('3084'))
@@ -202,7 +208,8 @@ def is_ans1_token(token):
Checking for just M is insufficient Checking for just M is insufficient
But we will only check for MII: But we will only check for MII:
Max length of the content using 2 octets is 7FFF or 32767 Max length of the content using 2 octets is 7FFF or 32767.
It's not practical to support a token of this length or greater in http It's not practical to support a token of this length or greater in http
therefore, we will check for MII only and ignore the case of larger tokens therefore, we will check for MII only and ignore the case of larger tokens
""" """

View File

@@ -1180,9 +1180,9 @@ class AuthProtocol(object):
:param retry: flag that forces the middleware to retry :param retry: flag that forces the middleware to retry
user authentication when an indeterminate user authentication when an indeterminate
response is received. Optional. response is received. Optional.
:return token object received from keystone on success :return: token object received from keystone on success
:raise InvalidUserToken if token is rejected :raise InvalidUserToken: if token is rejected
:raise ServiceError if unable to authenticate token :raise ServiceError: if unable to authenticate token
""" """
# Determine the highest api version we can use. # Determine the highest api version we can use.

View File

@@ -154,8 +154,8 @@ class ServiceCatalog(object):
:param string service_type: Service type of the endpoint. :param string service_type: Service type of the endpoint.
:param string endpoint_type: Type of endpoint. :param string endpoint_type: Type of endpoint.
Possible values: public or publicURL, Possible values: public or publicURL,
internal or internalURL, internal or internalURL, admin or
admin or adminURL adminURL
:param string region_name: Region of the endpoint. :param string region_name: Region of the endpoint.
:returns: tuple of urls or None (if no match found) :returns: tuple of urls or None (if no match found)

View File

@@ -1644,7 +1644,7 @@ class TokenExpirationTest(BaseAuthTokenMiddlewareTest):
"""Ensure we cannot retrieve a token from the cache. """Ensure we cannot retrieve a token from the cache.
Getting a token from the cache should return None when the token data Getting a token from the cache should return None when the token data
in the cache stores the expires time as a *nix style timestamp. in the cache stores the expires time as a \*nix style timestamp.
""" """
token = 'mytoken' token = 'mytoken'

View File

@@ -73,8 +73,8 @@ class Client(httpclient.HTTPClient):
.. warning:: .. warning::
If debug is enabled, it may show passwords in plain text as a part of its If debug is enabled, it may show passwords in plain text as a part of
output. its output.
The client can be created and used like a user or in a strictly The client can be created and used like a user or in a strictly

View File

@@ -8,6 +8,7 @@ mock>=1.0
mox3>=0.7.0 mox3>=0.7.0
pycrypto>=2.6 pycrypto>=2.6
sphinx>=1.1.2,<1.2 sphinx>=1.1.2,<1.2
stevedore>=0.14
testrepository>=0.0.18 testrepository>=0.0.18
testresources>=0.2.4 testresources>=0.2.4
testtools>=0.9.34 testtools>=0.9.34