Minimize number of servers created for tests to avoid errors like
tempest.exceptions.BuildErrorException:
Server b5ebbe3e-6c30-4589-88b2-aaa52e107bee failed to build
and is in ERROR status
from happening [0].
This error is happening because too many servers are being created
concurrently in the gate, causing resource errors to be thrown.
This problem is only worsened with higher concurrency -- i.e. 4 -- as
the chances of creating many servers simultaneously across threads
are higher.
This commit:
Minimizes the number of servers that need to be created across classes
by consolidating test cases related to different policy "families" into
one class. This reduces the risk of running into `BuildErrorException`
errors being raised due to too many servers being created simultaneously
especially when higher concurrency is used.
Only applies to:
* policy "families" that require server creation
* small policy "families" -- i.e. containing one to three policies
[0] http://logs.openstack.org/56/475156/1/check/gate-tempest-dsvm-patrole-admin-ubuntu-xenial/df9f578/console.html#_2017-06-18_04_39_39_894737
Closes-Bug: #1698835
Change-Id: I3665aa5657dd5531a3b74edee42d6641bb6e6360
This is a trivial change that renames switchToRbacRole to
toggle_rbac_role.
This change is needed because:
- switchToRbacRole is camel case which is inconsistent with
all the snake-case variables names throughout Patrole and
OpenStack
- It violates Python's naming conventions [0].
[0] See pep8 styling guideline:
"Function names should be lowercase, with words separated
by underscores as necessary to improve readability. mixedCase
is allowed only in contexts where that's already the prevailing
style."
And for variable names:
"Use the function naming rules: lowercase with words separated
by underscores as necessary to improve readability."
Change-Id: Ib6dd50ba02c25d585e2ca0c9383771f9337212b8
Depends-On: Ie1c4b6a2801f10c8e83f6d3f88fe0364d69317fa
'check-uuid' and 'check-uuid --fix' are not working because we do not
set package name for them. This patch fixes that.
Change-Id: I553c364e3fc0d640620a01046dd7f70bdb704be2
Closes-Bug: #1678407
Currently, for every test case class, we need to add
re-switching rbac role in tearDown method. Thus for
every testcase using the tearDown method becomes
mandatory.
This patch removes tearDown dependency for re-switching
rbac-role.
Co-Authored-By: Mh Raies <mh.raies@ericsson.com>
Co-Authored-By: Felipe Monteiro <felipe.monteiro@att.com>
Implements: blueprint refactor-teardown-switch-roles
Change-Id: I3f0026533255c87b8128f2bf3a4aa488382a2523
This patch adds following capablities to RBAC tempest framework:
1. Restricts admin only tenant to be used for rbac as much as possible,
and thus removes need of creating additional tenant with "primary"
credential type.
2. Patrole framework requires "tempest_roles" value in the conf file
to be set to "admin" role. Which again restricts tempest.conf to a
hardcoded value. This patch takes care of this problem also.
Note: Adding this patch will required some cleanup and refactoring in
test files, which will be taken care in separate commits component wise.
Co-Authored-By: Mh Raies <mh.raies@ericsson.com>
Co-Authored-By: Felipe Monteiro <felipe.monteiro@att.com>
Implements bp: modifying-switching-role-mechanism
Closes-Bug: #1664600
Closes-Bug: #1664278
Change-Id: Ic665d35332def6b6ec7b0065d1ebe65514a926b9