3 Commits

Author SHA1 Message Date
Arx Cruz
0099f408da Replace yaml.load() with yaml.safe_load()
Avoid dangerous file parsing and object serialization libraries.
yaml.load is the obvious function to use but it is dangerous[1]
Bandit flags yaml.load() as security risk so replace all occurrences
with yaml.safe_load().

[1]https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html

Story: 1634265
Task: 38963

Change-Id: Ie5baf64696e6214e3dd01f6e06ede8fd8432cbb8
2020-03-09 10:24:11 +01:00
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
2018-12-21 15:58:41 +00:00
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
values.

Story: 2004503
Task: 28225

Change-Id: I80848d8ef9868ed3975b938d61880753eadc5ae9
2018-12-17 16:52:39 +00:00