Commit Graph

28 Commits

Author SHA1 Message Date
OpenDev Sysadmins 8e22559315 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:37:00 +00:00
Andreas Jaeger 6ff9586952 Retire rst2bash (step 3)
The repository is unused, let's retire it completly.

This is step 3 of retiring a project, see
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

Depends-On: https://review.openstack.org/592289
Change-Id: I3d675e864681512eedc955c3991f0b81314b0846
2018-08-16 18:39:51 +02:00
Doug Hellmann 7183206ae6 use python3 in tox
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>
2018-08-14 13:14:17 -04:00
Doug Hellmann 4aea509345 add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I3d3b7720a87f18e196debddd069530d6c019305a
Story: #2002586
Task: #24293
2018-08-13 16:47:27 -04:00
Doug Hellmann 17d32fb5c4 import zuul job settings from project-config
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
2018-08-13 16:46:50 -04:00
Pranav Salunke c9bef5e7b0 Minor changes, non-functional refactoring.
Change-Id: I36bba19ac1be5c865d8ab6521b84e3b3011af8c7
2017-06-19 07:34:52 +00:00
Roger Luethi dcdb86f2b2 Redo pylint fixes
This patch puts some pylint fixes back that got undone by a recent change.

Change-Id: If7bdee299fd1c3ca20cccffa8bd1862efbb6c545
2017-02-06 19:33:51 +01:00
Roger Luethi 0e0da6283c Clean up logging around write_bash_code
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
2017-01-16 12:09:00 +01:00
Jenkins 15e6be989d Merge "Add debian to list of distros" 2017-01-16 10:13:08 +00:00
Jenkins a66e63c743 Merge "pylint fixes for parser.py" 2017-01-16 10:11:08 +00:00
Roger Luethi c41a01acac pylint fixes for parser.py
This patch contains only changes to make pylint somewhat happier.

- shorten lines longer than 79 characters
- use raw strings where appropriate

Change-Id: I236856e4b01fb8b5b8967ed474e30554a2b48c31
2017-01-12 13:38:11 +01:00
Roger Luethi 4e617045a5 Add debian to list of distros
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
2017-01-12 12:24:52 +00:00
Pranav Salunke f7c6306f5d Update log file handling
- 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
2017-01-12 12:11:42 +01:00
Jenkins 6ab1007f58 Merge "Fix section header regex" 2017-01-11 16:18:30 +00:00
Jenkins c6ea6f8d63 Merge "Rename append method to update" 2017-01-11 16:12:35 +00:00
Roger Luethi 1ae4b3100f Remove get_bash_code
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
2017-01-10 22:55:15 +01:00
Roger Luethi 53dd4d5c39 Rename append method to update
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
2017-01-10 18:28:37 +01:00
Roger Luethi 8c9254d7d7 Fix section header regex
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
2017-01-10 12:03:07 +01:00
Roger Luethi 68b8c03838 Add logging to parser.py
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
2017-01-06 14:37:28 +01:00
Roger Luethi aba1cef0ec Robustness fixes in runparser
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
2017-01-04 16:12:56 +01:00
Jenkins 4a6753b7df Merge "Add config file path argument to iniset_sudo calls" 2017-01-04 12:32:08 +00:00
Roger Luethi c91437dd3f Add config file path argument to iniset_sudo calls
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
2017-01-03 20:00:11 +01:00
Roger Luethi 599376fc69 Fix method name
Fix name of method call (getEndindex should be get_end_index).

Change-Id: Id2cde9a0f5cb1c05dc0601f5322b94d96dd7a9ce
2016-12-29 19:00:55 +01:00
Pranav Salunke 54525dccdb Adding comments and section breaks.
Change-Id: Id93acf5bf8e81abceb5b0abbac6fd70accbfb85e
2016-12-29 09:40:01 +01:00
Pranav Salunke d23f101054 parser: Improve exception handling
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
2016-12-29 05:46:26 +01:00
Pranav Salunke c6d99ea667 Adds the parser and related files.
- Adding parser module.
- Adds custom exceptions and tests cases.
- Adds tools folder.
- Updated the documentation.
- Readme usage section now imports usage.rst.
- Improvements to tox.ini
- Adds config folder.
2016-12-20 17:11:55 +01:00
Pranav Salunke e279e39d75 Updates readme and documentation. 2016-12-20 14:58:16 +01:00
Pranav Salunke c2f80ba0a6 Initial Cookiecutter Commit. 2016-12-20 11:24:01 +01:00