Add a py27 environment to override the basepython value set in testenv
to ensure those tests still actually run under python 2.
Change-Id: I55c97908e95a7e1d5c15a16caf81fca13da215d9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I0599a87ecebc77cfb5b5b93d72d1716165faf01e
Story: #2002586
Task: #24293
This patch removes code that is not needed.
The parser_message is redundant now that the logging system writes the
error messages.
The error message for write_bash_code never worked: if writing fails,
write_bash_code() throws an exception which is not caught and the user
gets a stacktrace that is actually quite helpful.
Change-Id: I1e54d65bab21ee78928fd90b0246d33e66c560d3
This patch contains only changes to make pylint somewhat happier.
- shorten lines longer than 79 characters
- use raw strings where appropriate
Change-Id: I236856e4b01fb8b5b8967ed474e30554a2b48c31
Because "debian" is not part of the default list of distros, only
commands that are specifically aimed at Debian get included in the bash
script files produced for that distro.
To correct that, this patch adds debian to the list of distributions.
Change-Id: Ie6bac35f3a4eb07310ead14a6746f6336720c835
- Log file is fetched from the configuration file.
- Check if the log file exists before trying to delete it. Avoids error
conditions.
Change-Id: Ib4e39dea3f974fe90c69b1b6d08de24ca0577127
This patch removes get_bash_code. Getter methods are usually only added
when reading the attribute directly is not sufficient, which is not the
case here.
Also, the only caller of the method has no effect and is removed by the
patch as well.
Change-Id: I496d17e53903c93a30749196a5de6a7e776d03f9
The CodeBlock's append method is really just a wrapper around the
dictionary update method which is rather confusing.
This patch renames the method to match its purpose.
Change-Id: Ie59df6868afd0a55eccd3afb695a29fa5a525de8
The current regular expression used to find section headers in ini
files does not allow any digits. It misses all the ml2 related
section headers.
This patch adds digits from 0-9 to the regex.
Change-Id: I57a0f82302b8ed9ac2432f3afc0eab5581a70c27
This patch adds logging to parser.py. All log entries are written to a
log file. Log entries at a level higher than debug level are also
written to the console.
The patch uses logging to make it easy to diagnose parsing errors caused
by mismatched start and end markers for distro and code blocks.
Change-Id: Ieea40d58aaf827ef9ba2e4eec75c450c5a58ea27
This patch contains a few improvements to runparser which should make it
more robust and user-friendly.
The script...
... now aborts if an error occurs instead of happily claiming that it
succeeded
... does not try to clone the repo if it is already there
... no longer insists on using Python 2.7
... can work on systems that don't have bash in /bin
... prints a more concise, less verbose message
The first three changes fix buggy behavior observed in testing.
Change-Id: I289d3313ed57670e51783cb2c80f799971889e07
The current code is omitting the path argument when building an iniset
call.
The correct format is:
iniset_sudo <configuration file path> <section> <key> <value>
This patch adds the missing argument.
Change-Id: I6e83920194aea857a699f5b78a89759d19dc5a27
Multiple improvements for exception handling and raising the correct
exceptions. The following changes make the output nicer for readability
although, it still has some bits missing.
- Renaming exceptions.py to parsererr.py due to H237.
- Changing the custom exception prefix from Exception to Error.
- Parser deliberately raises custom exceptions pointing out the error.
- Changes to custom exception classes to match the error type better.
- Printing the rst_file name with a nicer error output.
- Exact location in the rst file needs find or grep method as the
location (LOC) is not yet provided.
- Errors are still easy to trace with find or grep.
Change-Id: I008563d7caaf4d059b30d7b687faf823b2e6a913