[DOC] Fix "Title level inconsistent" warning

This commit fixes the warning "Title level inconsistent". And the module
API docs should be shown up.

Change-Id: Ie9a3656b0a58300d611352d054868440f0ffd387
This commit is contained in:
Masayuki Igawa 2017-09-07 10:22:37 +09:00
parent 3f310141fb
commit a1c3af3350
No known key found for this signature in database
GPG Key ID: 290F53EDC899BF89
3 changed files with 71 additions and 72 deletions

View File

@ -130,19 +130,18 @@ this by leveraging the ``force_new`` kwarg::
# role
provider.clear_creds()
API Reference
=============
------------------------------
API Reference
-------------
The dynamic credentials module
------------------------------
''''''''''''''''''''''''''''''
.. automodule:: tempest.lib.common.dynamic_creds
:members:
--------------------------------------
The pre-provisioned credentials module
--------------------------------------
''''''''''''''''''''''''''''''''''''''
.. automodule:: tempest.lib.common.preprov_creds
:members:

View File

@ -28,15 +28,6 @@ LOG = logging.getLogger(__name__)
class DynamicCredentialProvider(cred_provider.CredentialProvider):
def __init__(self, identity_version, name=None, network_resources=None,
credentials_domain=None, admin_role=None, admin_creds=None,
identity_admin_domain_scope=False,
identity_admin_role='admin', extra_roles=None,
neutron_available=False, create_networks=True,
project_network_cidr=None, project_network_mask_bits=None,
public_network_id=None, resource_prefix=None,
identity_admin_endpoint_type='public', identity_uri=None):
"""Creates credentials dynamically for tests
A credential provider that, based on an initial set of
@ -74,6 +65,15 @@ class DynamicCredentialProvider(cred_provider.CredentialProvider):
admin clients. Defaults to public.
:param identity_uri: Identity URI of the target cloud
"""
def __init__(self, identity_version, name=None, network_resources=None,
credentials_domain=None, admin_role=None, admin_creds=None,
identity_admin_domain_scope=False,
identity_admin_role='admin', extra_roles=None,
neutron_available=False, create_networks=True,
project_network_cidr=None, project_network_mask_bits=None,
public_network_id=None, resource_prefix=None,
identity_admin_endpoint_type='public', identity_uri=None):
super(DynamicCredentialProvider, self).__init__(
identity_version=identity_version, identity_uri=identity_uri,
admin_role=admin_role, name=name,

View File

@ -41,26 +41,16 @@ def read_accounts_yaml(path):
class PreProvisionedCredentialProvider(cred_provider.CredentialProvider):
# Exclude from the hash fields specific to v2 or v3 identity API
# i.e. only include user*, project*, tenant* and password
HASH_CRED_FIELDS = (set(auth.KeystoneV2Credentials.ATTRIBUTES) &
set(auth.KeystoneV3Credentials.ATTRIBUTES))
def __init__(self, identity_version, test_accounts_file,
accounts_lock_dir, name=None, credentials_domain=None,
admin_role=None, object_storage_operator_role=None,
object_storage_reseller_admin_role=None, identity_uri=None):
"""Credentials provider using pre-provisioned accounts
This credentials provider loads the details of pre-provisioned
accounts from a YAML file, in the format specified by
`etc/accounts.yaml.sample`. It locks accounts while in use, using the
``etc/accounts.yaml.sample``. It locks accounts while in use, using the
external locking mechanism, allowing for multiple python processes
to share a single account file, and thus running tests in parallel.
The accounts_lock_dir must be generated using `lockutils.get_lock_path`
from the oslo.concurrency library. For instance:
from the oslo.concurrency library. For instance::
accounts_lock_dir = os.path.join(lockutils.get_lock_path(CONF),
'test_accounts')
@ -80,6 +70,16 @@ class PreProvisionedCredentialProvider(cred_provider.CredentialProvider):
:param object_storage_reseller_admin_role: name of the role
:param identity_uri: Identity URI of the target cloud
"""
# Exclude from the hash fields specific to v2 or v3 identity API
# i.e. only include user*, project*, tenant* and password
HASH_CRED_FIELDS = (set(auth.KeystoneV2Credentials.ATTRIBUTES) &
set(auth.KeystoneV3Credentials.ATTRIBUTES))
def __init__(self, identity_version, test_accounts_file,
accounts_lock_dir, name=None, credentials_domain=None,
admin_role=None, object_storage_operator_role=None,
object_storage_reseller_admin_role=None, identity_uri=None):
super(PreProvisionedCredentialProvider, self).__init__(
identity_version=identity_version, name=name,
admin_role=admin_role, credentials_domain=credentials_domain,