Make reading of deployer options case sensitive

One of the tempest plugins contains an option that is case
sensitive. Therefore, the reading of the deployer input option
has to be case sensitive as well.

The default behavior of ConfigParser is to return lowever-case
version of the option names. This commit changes that.

Change-Id: I53e722dbe8c7fe8dfc1079c5ed9fe07b449d9200
This commit is contained in:
Martin Kopec 2024-08-22 11:07:20 +00:00
parent 7488a1b337
commit 758a6ab129

View File

@ -136,6 +136,11 @@ def read_deployer_input(deployer_input_file, conf):
LOG.info("Adding options from deployer-input file '%s'", LOG.info("Adding options from deployer-input file '%s'",
deployer_input_file) deployer_input_file)
deployer_input = configparser.ConfigParser() deployer_input = configparser.ConfigParser()
# the following transforms the option names as found in an input file,
# the default implementation returns a lower-case version of the
# option names, however, we have at least one option that contains
# capitalized letters - RBAC_test_type from octavia-tempest-plugin
deployer_input.optionxform = str
deployer_input.read(deployer_input_file) deployer_input.read(deployer_input_file)
for section in deployer_input.sections(): for section in deployer_input.sections():
# There are no deployer input options in DEFAULT # There are no deployer input options in DEFAULT