summaryrefslogtreecommitdiff
path: root/keystoneclient/access.py
diff options
context:
space:
mode:
authorNavid Pustchi <npustchi@gmail.com>2016-04-23 03:19:58 +0000
committerNavid Pustchi <npustchi@gmail.com>2016-04-23 06:25:20 +0000
commit946e928b5285a4994c4ef365b43295bdd90c9961 (patch)
tree7e535845a5be75af7b0f2cae1e96186385e34c32 /keystoneclient/access.py
parentc0893709305260fa1d2df967e973363db614624d (diff)
downloadpython-keystoneclient-946e928b5285a4994c4ef365b43295bdd90c9961.tar.gz
Fix D401 PEP257 violation.
Currently tox ignores D401. 401: First line should be in imperative mood. This change removes it and make keystoneclient docstrings compliant with it. Change-Id: If34ff12d18390b357342cf29f2d116dd3c86a44d
Diffstat (limited to 'keystoneclient/access.py')
-rw-r--r--keystoneclient/access.py60
1 files changed, 30 insertions, 30 deletions
diff --git a/keystoneclient/access.py b/keystoneclient/access.py
index 7f4f988..6f22a08 100644
--- a/keystoneclient/access.py
+++ b/keystoneclient/access.py
@@ -97,7 +97,7 @@ class AccessInfo(dict):
return self.get('region_name')
def will_expire_soon(self, stale_duration=None):
- """Determines if expiration is about to occur.
+ """Determine if expiration is about to occur.
:returns: true if expiration is within the given duration
:rtype: boolean
@@ -114,7 +114,7 @@ class AccessInfo(dict):
@classmethod
def is_valid(cls, body, **kwargs):
- """Determines if processing valid v2 or v3 token.
+ """Determine if processing valid v2 or v3 token.
Validates from the auth body or a user-provided dict.
@@ -124,7 +124,7 @@ class AccessInfo(dict):
raise NotImplementedError()
def has_service_catalog(self):
- """Returns true if the authorization token has a service catalog.
+ """Return true if the authorization token has a service catalog.
:returns: boolean
"""
@@ -132,7 +132,7 @@ class AccessInfo(dict):
@property
def auth_token(self):
- """Returns the token_id associated with the auth request.
+ """Return the token_id associated with the auth request.
To be used in headers for authenticating OpenStack API requests.
@@ -153,7 +153,7 @@ class AccessInfo(dict):
@property
def expires(self):
- """Returns the token expiration (as datetime object)
+ """Return the token expiration (as datetime object)
:returns: datetime
"""
@@ -161,7 +161,7 @@ class AccessInfo(dict):
@property
def issued(self):
- """Returns the token issue time (as datetime object)
+ """Return the token issue time (as datetime object)
:returns: datetime
"""
@@ -169,7 +169,7 @@ class AccessInfo(dict):
@property
def username(self):
- """Returns the username associated with the auth request.
+ """Return the username associated with the auth request.
Follows the pattern defined in the V2 API of first looking for 'name',
returning that if available, and falling back to 'username' if name
@@ -181,7 +181,7 @@ class AccessInfo(dict):
@property
def user_id(self):
- """Returns the user id associated with the auth request.
+ """Return the user id associated with the auth request.
:returns: str
"""
@@ -189,7 +189,7 @@ class AccessInfo(dict):
@property
def user_domain_id(self):
- """Returns the user's domain id associated with the auth request.
+ """Return the user's domain id associated with the auth request.
For v2, it always returns 'default' which may be different from the
Keystone configuration.
@@ -200,7 +200,7 @@ class AccessInfo(dict):
@property
def user_domain_name(self):
- """Returns the user's domain name associated with the auth request.
+ """Return the user's domain name associated with the auth request.
For v2, it always returns 'Default' which may be different from the
Keystone configuration.
@@ -211,7 +211,7 @@ class AccessInfo(dict):
@property
def role_ids(self):
- """Returns a list of user's role ids associated with the auth request.
+ """Return a list of user's role ids associated with the auth request.
:returns: a list of strings of role ids
"""
@@ -219,7 +219,7 @@ class AccessInfo(dict):
@property
def role_names(self):
- """Returns a list of user's role names associated with the auth request.
+ """Return a list of user's role names associated with the auth request.
:returns: a list of strings of role names
"""
@@ -227,7 +227,7 @@ class AccessInfo(dict):
@property
def domain_name(self):
- """Returns the domain name associated with the auth request.
+ """Return the domain name associated with the auth request.
:returns: str or None (if no domain associated with the token)
"""
@@ -235,7 +235,7 @@ class AccessInfo(dict):
@property
def domain_id(self):
- """Returns the domain id associated with the auth request.
+ """Return the domain id associated with the auth request.
:returns: str or None (if no domain associated with the token)
"""
@@ -243,7 +243,7 @@ class AccessInfo(dict):
@property
def project_name(self):
- """Returns the project name associated with the auth request.
+ """Return the project name associated with the auth request.
:returns: str or None (if no project associated with the token)
"""
@@ -256,9 +256,9 @@ class AccessInfo(dict):
@property
def scoped(self):
- """Returns true if the auth token was scoped.
+ """Return true if the auth token was scoped.
- Returns true if scoped to a tenant(project) or domain,
+ Return true if scoped to a tenant(project) or domain,
and contains a populated service catalog.
.. warning::
@@ -272,7 +272,7 @@ class AccessInfo(dict):
@property
def project_scoped(self):
- """Returns true if the auth token was scoped to a tenant(project).
+ """Return true if the auth token was scoped to a tenant(project).
:returns: bool
"""
@@ -280,7 +280,7 @@ class AccessInfo(dict):
@property
def domain_scoped(self):
- """Returns true if the auth token was scoped to a domain.
+ """Return true if the auth token was scoped to a domain.
:returns: bool
"""
@@ -288,7 +288,7 @@ class AccessInfo(dict):
@property
def trust_id(self):
- """Returns the trust id associated with the auth request.
+ """Return the trust id associated with the auth request.
:returns: str or None (if no trust associated with the token)
"""
@@ -296,7 +296,7 @@ class AccessInfo(dict):
@property
def trust_scoped(self):
- """Returns true if the auth token was scoped from a delegated trust.
+ """Return true if the auth token was scoped from a delegated trust.
The trust delegation is via the OS-TRUST v3 extension.
@@ -306,7 +306,7 @@ class AccessInfo(dict):
@property
def trustee_user_id(self):
- """Returns the trustee user id associated with a trust.
+ """Return the trustee user id associated with a trust.
:returns: str or None (if no trust associated with the token)
"""
@@ -314,7 +314,7 @@ class AccessInfo(dict):
@property
def trustor_user_id(self):
- """Returns the trustor user id associated with a trust.
+ """Return the trustor user id associated with a trust.
:returns: str or None (if no trust associated with the token)
"""
@@ -322,7 +322,7 @@ class AccessInfo(dict):
@property
def project_id(self):
- """Returns the project ID associated with the auth request.
+ """Return the project ID associated with the auth request.
This returns None if the auth token wasn't scoped to a project.
@@ -337,7 +337,7 @@ class AccessInfo(dict):
@property
def project_domain_id(self):
- """Returns the project's domain id associated with the auth request.
+ """Return the project's domain id associated with the auth request.
For v2, it returns 'default' if a project is scoped or None which may
be different from the keystone configuration.
@@ -348,7 +348,7 @@ class AccessInfo(dict):
@property
def project_domain_name(self):
- """Returns the project's domain name associated with the auth request.
+ """Return the project's domain name associated with the auth request.
For v2, it returns 'Default' if a project is scoped or None which may
be different from the keystone configuration.
@@ -359,7 +359,7 @@ class AccessInfo(dict):
@property
def auth_url(self):
- """Returns a tuple of identity URLs.
+ """Return a tuple of identity URLs.
The identity URLs are from publicURL and adminURL for the service
'identity' from the service catalog associated with the authorization
@@ -376,7 +376,7 @@ class AccessInfo(dict):
@property
def management_url(self):
- """Returns the first adminURL of the identity endpoint.
+ """Return the first adminURL of the identity endpoint.
The identity endpoint is from the service catalog
associated with the authorization request, or None if the
@@ -392,7 +392,7 @@ class AccessInfo(dict):
@property
def version(self):
- """Returns the version of the auth token from identity service.
+ """Return the version of the auth token from identity service.
:returns: str
"""
@@ -416,7 +416,7 @@ class AccessInfo(dict):
@property
def is_federated(self):
- """Returns true if federation was used to get the token.
+ """Return true if federation was used to get the token.
:returns: boolean
"""