Merge "Fix rendering of account generator utility authentication table"
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 7e4503d..c2df0b6 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -135,7 +135,7 @@
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
-#html_use_smartypants = True
+html_use_smartypants = False
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
diff --git a/doc/source/library.rst b/doc/source/library.rst
index a89512c..6a2fb83 100644
--- a/doc/source/library.rst
+++ b/doc/source/library.rst
@@ -66,3 +66,4 @@
library/rest_client
library/utils
library/api_microversion_testing
+ library/auth
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index 25efd2e..dabc45e 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import testtools
+
from tempest.api.compute import base
from tempest.common import tempest_fixtures as fixtures
from tempest.common.utils import data_utils
@@ -36,10 +38,16 @@
cls.aggregate_name_prefix = 'test_aggregate'
cls.az_name_prefix = 'test_az'
- hosts_all = cls.os_adm.hosts_client.list_hosts()['hosts']
- hosts = map(lambda x: x['host_name'],
- filter(lambda y: y['service'] == 'compute', hosts_all))
- cls.host = hosts[0]
+ cls.host = None
+ hypers = cls.os_adm.hypervisor_client.list_hypervisors()['hypervisors']
+ hypers_available = [hyper['hypervisor_hostname'] for hyper in hypers
+ if (hyper['state'] == 'up' and
+ hyper['status'] == 'enabled')]
+ if hypers_available:
+ cls.host = hypers_available[0]
+ else:
+ raise testtools.TestCase.failureException(
+ "no available compute node found")
@test.idempotent_id('0d148aa3-d54c-4317-aa8d-42040a475e20')
def test_aggregate_create_delete(self):
diff --git a/tempest/lib/auth.py b/tempest/lib/auth.py
index 9c5ad8e..217c1ce 100644
--- a/tempest/lib/auth.py
+++ b/tempest/lib/auth.py
@@ -180,7 +180,7 @@
:param headers: HTTP headers of the request
:param body: HTTP body in case of POST / PUT
:param filters: select a base URL out of the catalog
- :returns a Tuple (url, headers, body)
+ :return: a Tuple (url, headers, body)
"""
orig_req = dict(url=url, headers=headers, body=body)
@@ -224,6 +224,7 @@
Configure auth provider to provide alt authentication data
on a part of the *next* auth_request. If credentials are None,
set invalid data.
+
:param request_part: request part to contain invalid auth: url,
headers, body
:param auth_data: alternative auth_data from which to get the
@@ -370,16 +371,19 @@
"""Base URL from catalog
:param filters: Used to filter results
- Filters can be:
- - service: service type name such as compute, image, etc.
- - region: service region name
- - name: service name, only if service exists
- - endpoint_type: type of endpoint such as
- adminURL, publicURL, internalURL
- - api_version: the version of api used to replace catalog version
- - skip_path: skips the suffix path of the url and uses base URL
- :rtype string
- :return url with filters applied
+
+ Filters can be:
+
+ - service: service type name such as compute, image, etc.
+ - region: service region name
+ - name: service name, only if service exists
+ - endpoint_type: type of endpoint such as
+ adminURL, publicURL, internalURL
+ - api_version: the version of api used to replace catalog version
+ - skip_path: skips the suffix path of the url and uses base URL
+
+ :rtype: string
+ :return: url with filters applied
"""
if auth_data is None:
auth_data = self.get_auth()
@@ -499,16 +503,19 @@
'identity', we can use the original auth URL to build the base_url.
:param filters: Used to filter results
- Filters can be:
- - service: service type name such as compute, image, etc.
- - region: service region name
- - name: service name, only if service exists
- - endpoint_type: type of endpoint such as
- adminURL, publicURL, internalURL
- - api_version: the version of api used to replace catalog version
- - skip_path: skips the suffix path of the url and uses base URL
- :rtype string
- :return url with filters applied
+
+ Filters can be:
+
+ - service: service type name such as compute, image, etc.
+ - region: service region name
+ - name: service name, only if service exists
+ - endpoint_type: type of endpoint such as
+ adminURL, publicURL, internalURL
+ - api_version: the version of api used to replace catalog version
+ - skip_path: skips the suffix path of the url and uses base URL
+
+ :rtype: string
+ :return: url with filters applied
"""
if auth_data is None:
auth_data = self.get_auth()