Using six.PY3 as configparser.SafeConfigParser in py2 got
renamed to configparser.ConfigParser in py3. In order to
keep the codebase running on both version, we are using
it.
Change-Id: I78471e3d0962cda610c22641787d80103eb413b0
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
values.
Story: 2004503
Task: 28225
Change-Id: I80848d8ef9868ed3975b938d61880753eadc5ae9
--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
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
discovery.
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
Depends-On: https://review.openstack.org/#/c/614312/
Change-Id: I76b8cf694116801e36587929bf320e5743534791
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
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
- 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
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
patch.
Change-Id: I47a12560bee4746efb54eb9b3c841b2783aa15f6
Generate accounts.yaml file when create_accounts_file
is specified and test_accounts is not.
Story: 2001693
Task: 8685
Change-Id: I7ed8390b29a430d97e1846f8f868f5b6af8eb02b
* 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 main.py which leads to the above error.
* Removed additional overrides image.http_image from roles
Change-Id: I3ab32b6c5628281f55193291cd367dcdb76a5571
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
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
Move checking availability of services from main:config_tempest
to services:services:set_service_availability.
Change-Id: Iafa1ff774c70216d22442eeaaba42d90f66bda62
validation.image_ssh_user option is heavily used in CI and it's also needed
in refstack. Therefor set the value automatically when image used is cirros.
Change-Id: Ib823380225fda78462c727e50a0f4f82b6da4e74
When --test-accounts is used, don't print any user credentials
to a tempest.conf file.
Depends-On: https://review.openstack.org/#/c/570822/
Change-Id: Ic7977ed9e0e03d04aca446407b22a9a73c2dca98
This patch add the load of deployer-input automatically, if exists in
default path (~/tempest-deployer-input.conf).
It also add the option to not load it, with --no-default-deployer
This will fix the cases that user miss to add --deployer-input and
tempestconf miss some configuration due of that.
Change-Id: I17ce46bac06158dd3cca298f33c6ea929051fb06
Make main and method responsible for parsing arguments more
modular, so that, it's easier to import them.
Now the argument parser can be imported to an other project,
we want to integrate to. This way, we achieve the CLI which
will be maintained at only one place.
Split main to two parts:
1. arguments handling
2. the rest of config_tempest, which can be importable
as an external module.
Change-Id: I3b1b9cbd05ccdb7ccae1b34211c4c955e831d32d
This patch reduce the requirements of the values in the
defaults-overrides file when the user run the tool without
it.
Change-Id: I2a6d375598ee39789f81da750ba02783da2a83c2
* each service class was moved to a new file
* Service and VersionedService were moved from api_discovery to service_base.py
* api_discovery.py is removed and methods for discovery were moved to a newly
created class Services - class holds methods related to instantiating
services, discovering their versions and extensions, configuring them
* constants were moved to an independent file - constants.py
Change-Id: I00880f4bd30cc4d1609c20aecca820854312b1e7
Non admin user or a user with no such privileges can't list
services. Therefor cinder-backup and metering services can't
be discovered for such a user.
The patch adds a warning to inform the user.
Change-Id: I48119b7a48f49f58dfac7bf34c75a08681b9ae32
* ClientManager and ProjectsClient class were moved to clients.py
* tests related to ClientManager class were moved to test_clients.py
* Credentials and auth_provider were decoupled from ClientManager and moved
to credentials.py into a Credentials class - credentials are now accessible
from everywhere and can be reused.
Change-Id: I7251d6353a91f4bbd7b9b7839ad36bb946b660c8
* config_tempest.py was renamed to main.py - entrypoint for console-script
(discover-tempest-config) was changed too
* TempestConf class was decoupled from main.py and moved to tempest_conf.py
file. Imports of related tests were edited and the order of imports in each
file was changed so that other dependencies are first followed by a blank
space and then local dependencies are listed.
* tests related to TempestConf class were moved to test_tempest_conf.py file
Change-Id: Idb235b969ba3c1e320aa3efa7fe77b5c59f4ffc6