1136 Commits

Author SHA1 Message Date
Jenkins
dc09e993f0 Merge "Add a tiny bit more verbosity to validate.py" 2013-08-21 03:23:58 +00:00
Jenkins
98da5b4f70 Merge "Update flagmappings" 2013-08-17 17:54:14 +00:00
Jenkins
7aa0152a31 Merge "strip spaces before writing the files" 2013-08-16 20:42:45 +00:00
Jenkins
fab9175c46 Merge "Change whitespace check to be info only" 2013-08-16 20:40:57 +00:00
Andreas Jaeger
ab213c10dc Add a tiny bit more verbosity to validate.py
validate.py did not give any progress ahead of which books are going to
get build which is a bit annoying if you run it locally.

With my patch you see:
$ tools/validate.py

Following files will be validated:
>>> doc/src/docbkx/openstack-network-connectivity-admin/app_demo_routers_with_private_networks.xml

Queuing the following books for building:
  openstack-network-connectivity-admin
Building all books now...
>>> Build of book openstack-network-connectivity-admin succeeded.

Change-Id: Ib5dbe41dea7512ea33fd314ca8842bc5e38cf4ba
2013-08-16 10:28:09 +02:00
Christian Berendt
3c85ea4fbf added parameters to control the behaviour
test.py is a modified copy of validate.py. I introduced a new
name to not cause race conditions with the existing Jenkins
job which actually uses validate.py.

This patch introduces the following new parameters and changes
the default behaviour of the script. By default the script will
do nothing.

--check-build: With this parameter the script tries to build
               all books affected by modified files.

--check-syntax: With this parameter the script checks if modified
                files are still using valid XML syntax.

--with-niceness: Using this parameter together with --check-syntax
                 will also check the syntax for niceness issues (for
                 example trailing whitespaces).

--non-voting: With this parameter set the script always returns 0
              as exit code.

Possible Jenkins jobs:

./tools/test.py --check-build
./tools/test.py --check-syntax
./tools/test.py --check-syntax --with-niceness --non-voting

The force parameter is also available (as in validate.py). But
I think it's not meaningful to force the build of all books
or the syntax check of all files because this will result again
in very long runtimes.

We should not use the --non-voting parameter on Jenkins. It should
be possible to simply define non-voting jobs. Then the job is
failed in the review request, but Jenkins still gives +1.

Change-Id: I2ed6f80beb109c60bd7f0ca2417426f776383973
2013-08-15 17:30:20 +02:00
Jenkins
4e57235d2e Merge "take care of books with sources in subdirectories" 2013-08-15 14:31:20 +00:00
Jenkins
5bbf4c120e Merge "introduced force to validate and build everything" 2013-08-15 14:26:11 +00:00
Jenkins
4f4ac48272 Merge "added scripts to cleanup spaces in XML files" 2013-08-15 14:21:14 +00:00
Christian Berendt
de0d92c396 added scripts to cleanup spaces in XML files
example for remove_trailing_whitespaces.sh:

"  testing   \n" --> "  testing\n"

examples for remove_unnecessary_spaces.py:

"<testing>    foobar foobar" --> "<testing>foobar foobar"
"foobar foobar   </testing>" --> "foobar foobar</testing>"

Change-Id: Ie15a7a1491bf412ff893c84e76061ef623581145
2013-08-15 11:42:12 +02:00
Christian Berendt
82c76849e3 take care of books with sources in subdirectories
At the moment the validation doesn't take care of books
where the pom.xml is in an other directory than the sources
of the book. This patch will fix this issue.

For example: the pom.xml of basic-install is available at
doc/src/docbkx/basic-install/pom.xml but the sources of the
books are in doc/src/docbkx/basic-install/src. Because
the path to the pom.xml differs from the path of the sources
the validation will not check the files in the sources
directory for xi:include elements.

Change-Id: I3b92c3c4bff46ba6f9ac53b3ec56d24e7caf6ff6
2013-08-15 10:26:59 +02:00
Christian Berendt
d807a9efc5 introduced force to validate and build everything
Change-Id: I37214ad43ff33f8d698c4ad8141c1d8798a36fad
2013-08-15 07:01:52 +02:00
Christian Berendt
bb3c22382a print the relative path in list of modified files
Change-Id: I1325739ed11c23c324af50b05ab9063a255fcc33
2013-08-15 06:58:36 +02:00
Jenkins
fd895f2655 Merge "build several books in parallel" 2013-08-15 02:00:18 +00:00
Jenkins
24f9dfc98d Merge "reduced verbosity of validation script" 2013-08-14 21:29:29 +00:00
Christian Berendt
31b64ee470 build several books in parallel
This patch makes it possible to run several builds of affected
books in parallel.

Change-Id: I155ee1fa3fc7ebcf53a0b00558b5a76eabf4ad8d
2013-08-14 12:08:00 +02:00
Christian Berendt
7b6f211412 build every book only once
At the moment a wrong check makes it possible that affected books
are build several times. That's not useful and should be changed.

Change-Id: I27c016c6d4ef98fead53609013c46302fa8b67d2
2013-08-14 10:02:54 +02:00
Christian Berendt
67d5ef1ef6 strip spaces before writing the files
Without stripping the spaces tools/validate.py will not accept
the generated XML files.

Change-Id: I67d58cdf602107be05c6152eb59e4c12a2c0afd4
2013-08-13 11:03:15 +02:00
Tom Fifield
2c01f03ab7 Update flagmappings
Just a quick run of the autogenerate tool to update the flagmappings and tables for
nova, cinder and neutron

Change-Id: Ic75b54480fc86780577521a7a6faec0335adf400
2013-08-13 08:56:41 +00:00
Christian Berendt
c298f0374a make validation workable inside book directories
For example with this patch the following is working without issues:

cd doc/src/docbkx/openstack-network-connectivity-admin
../../../../tools/validate.py

Change-Id: Ie6d610104987eb3be430f9afc4f4cd348a77297d
2013-08-13 10:50:33 +02:00
Tom Fifield
827183f59f Change whitespace check to be info only
The recent introduction of the whitespace check has been good for
improving our consistency, however while discussion is ongoing
about how to best manage whitespace, the check should be non-voting.

This patch (intended to be temporary while discussion continues)
changes the script to print when whitespace is wrong,
rather than leaving a -1 vote.

Change-Id: I082aa4418864cd50d087dfe01c3bfff4d6df9f8f
2013-08-13 18:32:10 +10:00
Christian Berendt
e9f4115697 reduced verbosity of validation script
Change-Id: Iaf633193f5da7efa49855d0b5c1575cc171b9bc2
2013-08-13 10:27:19 +02:00
Christian Berendt
7c4b4bd4a3 validate modified files and build affected books
At the moment the validation script simply validates all
files and builds all books afterwards. This results in a
very long runtime (appr. 30 minutes at the moment).

With this patch only modified files are validated and only
affected books are built. A book is affected if one XML
file includes a modified file. If no book is directly
affected all books are built.

In this way, resources can be saved and validation is
performed much faster.

Change-Id: I17dcf119c0bafc4656c9f267f0d3f5ae884ea76e
2013-08-12 11:47:51 +02:00
Tom Fifield
d0abb8c290 Add Autogenerate-config-doc code to tools
This patch brings the auto-generate-config doc tool into
the openstack-manuals repo, where it can be used to update
the configuration option tables.

patchset2 fixes obvious things noted by reviewers, likely
needs more fixing.

patchset 4 adds update feature, fixes pep8

patchset 5 removes debugging print

patchset 6 adds warning to tables regarding their
           automatically generated nature

patchset 7 updated nova flagmappings for H2 and
           adds updated nova tables

patchset 8 adds a seciton in the readme with a worked example
           from a recent use of the script

patchset 10 fixes for cinder
patchset 11 testing, fixing
patchset 12 testing, fixing
patchset 13 adds categories to cinder.flagmappings, generates
            docbook tables for cinder
patchset 14 adds mappings for neutron, and generates docbook
            tables based on these

patchset 15 adds list of bugs this patch will fix

patchset 16 fixes whitespace error in automatically generated tables :(

fixes bug 1192225
Partial-Bug 1207550
Partial-Bug 1207549
fixes bug 1206827
Partial-Bug 1206336
fixes bug 1204484
Partial-Bug 1204205
fixes bug 1202260
fixes bug 1201710
fixes bug 1200794
Partial-Bug 1200740
Partial-Bug 1200418
Partial-Bug 1200047
Partial-Bug 1199209
Partial-Bug 1197657
fixes bug 1197653
fixes bug 1197295
Partial-Bug 1197088
Partial-Bug 1195900
fixes bug 1195560
fixes bug 1195433
Partial-Bug 1192752
fixes bug 1187278
Partial-Bug 1106428
Change-Id: Icd3f4496850c375c9359a10eddb25ab5c722595e
bp:autogenerate-config-tables
2013-08-10 09:43:55 +08:00
Christian Berendt
801d867086 verify that no unnecessary whitespaces are used
This change is also cleaning up all remaining whitespaces
to make the new validation method workable.

Change-Id: I15d288c5faa583aee8b4707b6a04ee2683326fe7
2013-08-08 11:38:42 +02:00
Sean Roberts
2950302ecc validate.py variable changes
added ,'bk001-ch003-associate-general.xml' to FILE_EXCEPTIONS and removed 'openstack-training' from BOOK_EXCEPTIONS. validate.py was failing  http://logs.openstack.org/50/40550/1/check/gate-openstack-manuals-validate/e3d606e/console.html.gz. As per Lorin, next step may be to remove individual file validation altogether

Change-Id: Ibd865730c1f17d221a5d783fd65b2c8ba2f567cc
2013-08-07 14:23:10 -07:00
Christian Berendt
a3ea6012fd do not exit after first invalid file
At the moment tools/validate.py exits after it found an
invalid file.

I think it's better to always validate all files and to
exit then if any invalid file was found. This way the
creator of a review request can fix all found issues in
all files and has not to create several patch sets.

Change-Id: Ic5668f0791680802b8cef3b5e1016c9dc76479b9
2013-08-06 15:33:00 +02:00
Lorin Hochstein
fb60e74678 Attempt to build all books
Modifies tools/validate.py to run "mvn clean generate-sources"
in every directory that has a pom.xml file.

The script will fail with an error if any of the books fail to build.
It will terminate on the first failure.

Fixes bug 1031374

For now, we aren't gating on openstack-training

Change-Id: Ic0136e4245e8e4bfa2e790574e3ec82c944c4b02
2013-07-29 12:43:19 -04:00
Jeremy Stanley
e8912ea0a5 The docbookxi.rng schema moved to oasis-open.org.
Change-Id: I706c4989c9619c7dfc3a4a00df4e2ec92ddd950f
2013-07-21 19:08:10 +00:00
Lorin Hochstein
9a5a297b79 Validate presence of xml:id in section
In tools/validate.py, check for xml:id attributes.

While testing this, found a file that contained missing xml:id, that
was corrected.

See bug #1181659

Change-Id: I61f61c5f6de87bee8c7bc2eb9e3bfe23426a3adb
2013-05-24 23:53:17 -04:00
daisy-ycguo
a5c38ec386 Update generatedocbook
Add namespace "xlink" to attribute "title" under element "link"

Bug #1178395

Change-Id: I41dfa51a03dc59efcd96004190aa42d5278dccdf
2013-05-10 03:53:01 +08:00
daisy-ycguo
ae01c04fd4 Add slicing tool to the master branch
This patch added tools used for slicing and merging in translation process.
The patch also includes the POT files for each documents.
The PO files are not included, which can be downloaded from Transifex.

Fixes: bug #1153415
Change-Id: Ia455134c99acb1129e8f10deda0d85867b1ef9a3
2013-03-14 10:53:54 +08:00
Lorin Hochstein
7b1e8efab4 Fix XML schema validation failures
With this patch, running the tools/validate.py script will return
no DocBook RelaxNG schema validation failures.

Once this patch lands, and the equivalent lands in stable/folsom,
I will follow up on getting this run automatically by Jenkins so
we can see the results when there are new doc patch proposals.

There were three XML validation failures that were addressed

openstack-compute-admin/rootwrap.xml:

rootwrap.xml had to xml:id values that were the same. These have
been changed so they are different. It turns out this file was not
being included in the documentation at all. I submitted a separate
patch to include it: https://review.openstack.org/20551

openstack-compute-admin/computeconfigure.xml:

computeconfigure.xml had xi:include elements with an 'os' attribute.
This violates the spec, and it doesn't work, either. We had two
lines that looked like this:

<xi:include os="ubuntu" ...>
<xi:include os="rhel;fedora;centos" ...>

and both files were being included in the docs. This was changed so
that only one file is included, and there's a note that has been
added that describes the difference between the two files, which
is very minor (just one parameter).

openstack-ha/ha-guide-docinfo.xml:

This isn't a real XML file, it's a fragment of XML that is used
by a non-standard toolchain. The validation script has been configured
to just ignore it for now.

Change-Id: Ie77218efc56c16b7bf162f5e02fd7a6d99116dc1
2013-01-26 22:03:23 -05:00
Lorin Hochstein
04142e3bd0 Add script to validate files are valid DocBook.
Adds a script called tools/validate.py that will check all XML
files against the DocBook 5 RELAX NG schema.

Does not check pom.xml files or files inside of directories named
"target".

Change-Id: I9614f1b10ac2da608a245c7644309a5be38c8995
2012-12-17 22:34:55 -05:00
Joe Gordon
d8849d5a82 Remove unused tools/rfc.sh
OpenStack now uses git-review from pip

Change-Id: Ib9e73f223478fe6df00011e385f767ff1a2d6bc2
2012-05-23 19:11:16 -07:00
James E. Blair
41bdc31500 Add rfc.sh to help with gerrit workflow. 2011-09-15 15:03:40 -07:00