Commit Graph

94 Commits (cdc0266de52906d929a0c5239a7b5458844dc886)

Author SHA1 Message Date
Martin Kopec cdc0266de5 Allow to specify min flavor memory and disk size
python-tempestconf doesn't provide any way how to define a
different flavor memory and disk size but provides an option
for defining a custom image (not cirros which is default).
However, when using custom image the default flavor size is
not enough.
Therefore the review adds two arguments which can be used
for defining flavor minimum memory and minimum disk size.

The review also edits the documentation and fixes a few typos.

Change-Id: Iba14b65ff8e147765e47d223dea6231ab649135f
Story: 2001536
Task: 6341
4 years ago
Martin Kopec dbb2711c59 Add RNG device to images and flavours
Upload new images and flavours with random number generator
device [1]. It prevents the tests failing due to an image
not ready for login error and can improve image boot time.


Change-Id: I50114a3914e0df0e22706ca8a7a1649eb1ced31d
4 years ago
Martin Kopec d376c37fd6 Add unit test for profile feature
The patch adds a new unit test for profile feature.
The patch also converts all overrides values read from
profile.yaml to string as this is the data type of overrides.

Change-Id: I795b9b900b6274e689ba64b9721fb63e49696dea
5 years ago
Zuul 3a59007123 Merge "Add profile argument" 5 years ago
Zuul 7c285f64d5 Merge "Add argument which allows users to add extensions" 5 years ago
Martin Kopec af57dd6719 Add profile argument
The patch implements --profile argument, which defines a path to
a profile.yaml file - a file which contains python-tempestconf
arguments and their values.
Also --generate-profile argument is introduced. A user can generate
a sample profile.yaml file using this argument. The sample contains
definitions of all python-tempestconf arguments set to their default

Story: 2004503
Task: 28225

Change-Id: I80848d8ef9868ed3975b938d61880753eadc5ae9
5 years ago
Martin Kopec 3a4c6c7f6f Add argument which allows users to add extensions
--append argument appends a value or values to the specified
section.key pair. It may be helpful in cases when a user wants
to add custom extensions to tempest.conf in an automated job.

Change-Id: I116f4456823913f21b5f8f01ff2b14d42ec67dc2
Story: 2004429
Task: 28088
5 years ago
Zuul e8ccab40d4 Merge "Constraint flake8 and pyflakes versions" 5 years ago
Martin Kopec e725235856 Fix flaky unit tests
The unit tests were flaky, because they were using a shared
variable and changing it.
The patch also fixes unused variables.

Change-Id: I2bc4225a395a34c0a61a289480231f36d12b00c6
5 years ago
Martin Kopec a1c232d61b Constraint flake8 and pyflakes versions
Versions of flake8 and pyflakes to be installed are inherited from
somewhere, which may be dangerous. Therefore the patch adds their
versions explicitly to test-requrirements.txt file.

Change-Id: I7c54407f6013c4c87fef4258cf963e393bea45b9
5 years ago
Zuul 7401f2d66e Merge "Set region_name from os-client-config to set identity.region" 5 years ago
Rabi Mishra ef2bc15127 Set region_name from os-client-config to set identity.region
We don't seem to set idenity.region which may not work in certain

Change-Id: Iebd24700420883a8993881cd8392bed8c772353e
5 years ago
Martin Kopec 6c8b05f3cf Set use_dynamic_credentials with a priority
When an accounts.yaml file is used, python-tempestconf
has to set use_dynamic_credentials to False, otherwise
the generated tempest.conf doesn't work with Tempest.
However, values from a deployer input file are set with
a priority, so that they are not overriden during

To fix the issue, use_dynamic_credentials has to be set
with priority too.

The related unit tests checks only a return value from
set function. The patch improves them, so that they
check if a value was overriden when it was supposed to
and the other way around.

Story: 2004140
Task: 27606
Change-Id: I76b8cf694116801e36587929bf320e5743534791
5 years ago
Arx Cruz a9af6c823d Remove static class loader
This commit remove the static class loader and add a dynamic one.
This is done using a new property available_classes that checks for
classes inherited by Services and generate a list of it.
It also change how tempestconf identify available services using the
list_services api instead of get_catalog api from tempest lib.
This way, tempestconf are no longer generating Services objects for
services that doesn't have a specialized class, but still set the
defaults for true or false if a service is running or not.
The discover method has changed to get the services from the list of
services instead of from the catalog.

Change-Id: Ic9d482378e9c975ed00f6aa7ed5f7aed6956d229
Story: 2002787
Task: 22672
5 years ago
Zuul e09e0b55a9 Merge "Don't expose credentials" 5 years ago
Martin Kopec c6ec0bdc79 Don't expose credentials
Don't expose credentials to tempest.conf when
--create-test-accounts is used.

When generating tempest.conf with demo creds, use
--create-accounts-file argument so that the argument
is tested in the gates.
The argument is used only on Devstack.

Tempest concurrency of devstack demo job is reduced to 1
because the minimal accounts file is used.

Change-Id: Id5c90810666d783cf3939086ef27149ef53277f8
Story: 2003016
Task: 23036
5 years ago
Arx Cruz 4ea3580672 Fix identity url version detection
Before we could diferentiate the api version for identity because
the use of /v2 or /v3. Even though v2 is now deprecated, we need
to continue support previous versions of openstack. In this case
We cannot relay on the /v2 or /v3 in the url. The best user case
is to do a request in the base url (without any version) and
check if we have v3 version stable. If so, we assume identity
version is v3 otherwise, is v2.

Change-Id: Ia41d21ebad9329ae9fa506868957a72e6f9a5ca5
5 years ago
Luigi Toscano 2273794919 horizon: don't error out for certificate issues
The code should be rewritten anyway (see!/story/2002787)
and in general the detection of the dashboard location
should be more roboust, but the code should not raise
an exception.
and horizon settings are relevant only for the (few)
Horizon Tempest tests, but the system can otherwise work.

Change-Id: I62607ce4de65062a0c37bdd23220edf9ea7e6818
Story: 2003024
Task: 23048
5 years ago
Martin Kopec 61f9d66fc7 Fix identity URL parsing
The identity URLs have a different rules for parsing,
but the code before looked for word 'identity' in
whole given URL to determine it was an identity URL.
This can conflict with a URL hostname which can contain
'identity' too.
The patch fixes that by looking for 'identity' only in
URL.path (after hostname:port part).
The patch also adds a new unit test for this case.

Change-Id: I265f4d38d81dc74b05f2af9adb6fe33db876329c
Story: 2002965
Task: 22970
5 years ago
Zuul 947946419c Merge "Fix http_image uploading to glance" 5 years ago
Martin Kopec 2656d9b2bd Improve flavor detection
The patch adds a functionality for detecting two smallest
flavors available in the system in case, creation of resources
is not allowed and m1.nano and m1.micro flavors are not available.

Change-Id: Idc4fcd784385113a71fc8c33edd9c30be9c2bfd0
Story: 2002932
Task: 22919
5 years ago
Martin Kopec dcc4e9a5dd Fix http_image uploading to glance
image.http_image was during the refactoring mistaken for an image
which is uploaded to glance and that caused the issues described
in the linked story.
image.http_image is a tempest option which defines http accessible
image. It can be also in a compressed format, so it can't be
uploaded to glance before it's unpacked first.
The patch introduces a new python-tempestconf option in tempest.conf
defining an image which will be uploaded to glance.

Story: 2002931
Task: 22918
Change-Id: Idc03155b345d341903c2941f41ec4677a503b531
5 years ago
Zuul 529480a7bf Merge "Fix check_service_status" 5 years ago
Zuul 2f013e2c94 Merge "Remove the content of default-overrides.conf" 5 years ago
Martin Kopec 532cdc701b Fix check_service_status
The method returns None when discoverability is set explicitly
to True in CLI of python-tempestconf. The patch fixes that.

The patch also fixes one of the tests, where
self.Service.check_service_status was checked if it's True -
it's always True, it's a method.

A new unit test is added which sets discoverability simulating
CLI overrides and checks if check_service_status returns
an expected value.

Change-Id: I1690b5ff186bac28caf5113d771de8620d5a052c
5 years ago
Zuul ab4e518bab Merge "Replace tenant by project, part 2" 5 years ago
Luigi Toscano cdbc98572d More compatibility with Python 3
- use the six version of configparser and urllib, and depends on six;
- remove relative imports;
- adapt few tests to the changes.

The changes above should be noop from the point of view of
functionalities, at least on python 2.

And also:
- replace the py34 tox virtualenv with py35;
- add a non-voting py35 job (locally for now, it will be enabled
  to project-config also for gating when stable).

Story: 2002574
Task: 22142
Change-Id: I0a35abaae6f5b7095ebae765fbe2163046e0a4da
5 years ago
Martin Kopec 77fa9ad160 Remove the content of default-overrides.conf
Move all needed values to the load_basic_defaults method and
remove the rest.
The default-overrides.conf itself will be removed in a following

Change-Id: I47a12560bee4746efb54eb9b3c841b2783aa15f6
5 years ago
Martin Kopec 1bd20dca53 Replace tenant by project, part 2
Story: 2002116
Task: 20023
Change-Id: I465fe96120ed5609c2747b587963d2e5f57b55be
5 years ago
Zuul 02ca23a08d Merge "Use healthcheck api to determine swift service" 5 years ago
Chandan Kumar f5bfc21351 Use healthcheck api to determine swift service
* Added check_service_status to determine the service
  availability and later on it will be used for all services.

* Removed hardcoded values for swift services
* As swift was disabled earlier, SwiftOperator was not getting used
  and it is not present in the CI Job, let's use member role for
  the same.
* Set operator_role default to admin if admin credential is available
  otherwise, set operator_role to ResellerAdmin
* Do not fail if a conflict exist in roles names

Story: 2001253
Task: 5783

Co-Authored-By: Arx Cruz <>
Closes-Bug: 1776729
Change-Id: Ie1e9d8e98fde460f9270c2799f971ea017d10d84
5 years ago
Zuul 686efa4860 Merge "Fix boto method" 5 years ago
Martin Kopec ee518bf91f Fix boto method
Due to the ongoing refactoring, ec2_service option of boto method
was forgotten and is never used in the code.
The patch adds it back and moves the functionality of configure_boto
method to set_default_tempest_options one.

Change-Id: Ic92f647fd7ad8d40c7393949716990243a401ba7
Story: 2002120
Task: 19799
5 years ago
Zuul 6935a898bb Merge "Generate accounts.yaml" 5 years ago
Martin Kopec 243ab6cb47 Generate accounts.yaml
Generate accounts.yaml file when create_accounts_file
is specified and test_accounts is not.

Story: 2001693
Task: 8685

Change-Id: I7ed8390b29a430d97e1846f8f868f5b6af8eb02b
5 years ago
Martin Kopec 6d7968bb16 Fix username is not defined warning
The tool tries to find the credentials in auth section first
and if it gets None, it tries identity section then. Because
of this a unnecessary warning message is logged out.
The patch changes the way, how the credentials are retrieved
from conf, so that there are no warnings.

Change-Id: I841241bddeb12cac9207c15e9dc4e1de8860791b
Story: 2002539
Task: 22085
5 years ago
Zuul cf2b33b5df Merge "Allow non admin users to upload image to glance" 5 years ago
Zuul a27aa23a92 Merge "Fix identity service url for v3" 5 years ago
Zuul 5bae63c966 Merge "Remove admin_* from identity section" 5 years ago
Chandan Kumar 48f7e5e8e1 Fix identity service url for v3
  removes paste.ini and moves to flask, the service_url is expecting /v3
  in the end otherwise it will return 500 error.
* It also added code for checking status code and use
  requests.exceptions.HTTPError instead of RequestsException.
  It will catch ConnectionErrors or TimeoutErrors and others

Closes-Bug: #1776301

Change-Id: I6b0310ee5437ff428cc7321035656c7cb4f86773
5 years ago
Chandan Kumar a5c6dc0977 Allow non admin users to upload image to glance
* Currently only users having admin related permission, has the
  ability to upload image to glance which later used to set Image/
  image_alt ref in tempest.conf. In order to make easier for non-admin
  user, this changes allow the same and if the user does not have
  permission to do the same, it will log an exception with the
  proper message as non-admin user can upload the image from CLI.

* Fixed set_default_tempest_options method for image as it is giving
  AttributeError: 'ImageService' object has no attribute 'image_path
  because image_path is set in set_image_preferences which is called
  after service_class in which leads to the above error.

* Removed additional overrides image.http_image from roles

Change-Id: I3ab32b6c5628281f55193291cd367dcdb76a5571
5 years ago
Zuul e9606a5715 Merge "Replace tenant by project, part 1" 5 years ago
Martin Kopec 4912283b03 Remove admin_* from identity section
Since Tempest 12 following values are removed from
identity section:
 - admin_username
 - admin_password
 - admin_project_name
The values were moved to auth section.

Change-Id: Ia98c9449b3fdc7aae40d204f0e2da44f987a5f9d
5 years ago
Martin Kopec 283de20574 Replace tenant by project, part 1
Replace use of tenant when it's setting to or reading from
tempest.conf (conf object).
The change is needed for correct reading of that value in
dependent patches - need to count on that it's project not
tenant anymore.

Change-Id: Ic2987ce322a0cd4a92d35b06a86aec95226f981e
Story: 2002116
Task: 19795
5 years ago
Martin Kopec 03fe466bdd List and create swift roles
When swift service is enabled, python-tempestconf will now be
able to list roles and create swift related roles if they are
not found.

Change-Id: Ia5310a56f24e167a835416c2e5a6fc504bb61c26
5 years ago
Martin Kopec 154fe8878d Move configuring of services to services class
Move checking availability of services from main:config_tempest
to services:services:set_service_availability.

Change-Id: Iafa1ff774c70216d22442eeaaba42d90f66bda62
5 years ago
Zuul 90653f2a62 Merge "Don't expose user credentials" 5 years ago
Martin Kopec ed5163e729 Don't expose user credentials
When --test-accounts is used, don't print any user credentials
to a tempest.conf file.

Change-Id: Ic7977ed9e0e03d04aca446407b22a9a73c2dca98
5 years ago
Zuul 1e3caa063c Merge "Enhancements in nova support" 5 years ago
Arx Cruz 9be036cf1f Enhancements in nova support
This patch add the discover of nova following options:
* compute-feature-enabled.attach_encrypted_volume

Also add the defaults to the following to true:
* compute-feature-enabled.console_output
* compute-feature-enabled.resize

Change-Id: I96f140de50d5cfaeaab06e1e4d15e427c50b215b
5 years ago