History | View | Annotate | Download (17 kB)
Merge branch 'stable-2.10' into stable-2.11
Add support for value aliases to RAPI
This patch extends the metaclass used to generate RAPI handlers toallow creating aliases of certain values returned by GET methods.
Signed-off-by: Hrvoje Ribicic <riba@google.com>Reviewed-by: Thomas Thrainer <thomasth@google.com>
admin.rst: update and reword disk template section
The disk template section was not updated for Gluster. This commitalso refactors the section slightly by unifying the different remarksabout /etc/ganeti/file-storage-paths.
sphinx_ext is also changed in order to not hardcode too much...
Hs2Py constants: update Python references
Update references to constants that were previously in the generated'lib/_autoconf.py' and since the previous patch have been included inthe Hs2Py constant generation.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>...
Remove Python type predicate 'NoType'
Type predicate 'NoType' is no longer necessary.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Hook h2spy in Makefile.am
Add Python opcode generation
Fix spacing in opcode documentation generation
Opcode documentation is automatically generated from the Pythonopcodes in the reStructuredText format. This patch fixes the ill RSTdefinitions by adding the missing blank line.
Merge branch 'devel-2.7'
Signed-off-by: Iustin Pop <iustin@google.com>...
Fix build/sphinx_ext.py with tuple defaults for op params
When an OpCode's parameter has a tuple as default value, this codewill break:
buf.write("defaults to ``%s``" % default)
The patch fixes this and other potential cases by always passing atuple to '%'....
sphinx_ext: New directive for supported methods
Until now many resources, but not all and not consistently list theirsupported methods (e.g. “Supports the following commands: ``GET`` …”).Not only is it easy for this list to get out of date, but it would also...
sphinx_ext: Factorize getting RAPI handlers
The list of resources and handlers will also be used for generatinga per-resource table.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
sphinx_ext: Factorize handler methods/access
The factorized parts will be used to show a small table with methods andrequired permissions for each resource.
Use "none" instead of "everyone" in RAPI documentation
The list of required access permissions uses the word “everyone” to mean“no special permissions are needed”. The word “none” fits better.
Improve RAPI documentation on users and options
- Document fields in “rapi/users” file in the order they appear (username, password, options)- Mention new “--require-authentication” option- Clarify use of “write” on “GET” method
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
sphinx_ext: Drop text map for RAPI permissions
Other parts of the documentation directly refer to the constants through“pyeval”. There's no need for this map as it's just additional work tomaintain.
Build table with access permissions for RAPI resources
Sometimes it can be difficult to determine the access permissions neededfor a certain RAPI resource without looking at code. This table, addedat the end of “rapi.rst”, shows all resources and the permissions needed...
Sphinx extension: Module-level constant for tab width
Use a module-level constant for the tab width.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
RAPI documentation: Assertion for console fields
Assert that the documented fields are equal to those in the actualobject.
Link man pages in documentation
This patch depends on “Option to include man pages in documentation”. Inthe documentation build including man pages, all “:manpage:`…`”references are converted to links. For man pages not provided by Ganeti,Sphinx' standard formatting is used....
sphinx_ext: Allow use of “rapi” module in pyeval
This way constants like “rapi.RAPI_ACCESS_WRITE” can be used indocumentation.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Fix 'explicitely' common typo
It seems that 'explicitely' is wrong, and that the right form is'explicitly'. This is just fixing the typo plus adjusting affectedparagraphs.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
NEWS: Deprecate LUXI calls replaced with query2
Adding the “luxi” namespace is necessary in “sphinx_ext”.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Fix doc bug introduced in 12637df
Commit 12637df changed/generalised how we build fields in the sphinxextension, however it resulted in this uncaught-so-far result:
$ echo QUERY_FIELDS_GROUP | ./autotools/docpp<generator object BuildValuesDoc at 0x28fd370>...
QUERY_FIELDS_GROUP
sphinx_ext: No longer exclude “depends” parameter by default
By default parameters existing for all opcodes (e.g. “debug_level”) arenot listed in the RAPI documentation. With this change the “depends”parameter will be listed unless explicitely excluded....
Add error codes documentation
Generalize docpp and sphinx_ext
DeprecationWarning fixes for pylint
In version 0.21, pylint unified all the disable-* (and enable-*)directives to disable (resp. enable). This leads to a lot ofDeprecationWarning being emitted even if one uses the recommendedversion of pylint (0.21.1, as stated in devnotes.rst)....
sphinx_ext: workaround epydoc warning
Similar to commit c29e35f, this works around epydoc breakage byaliasing the module. Makes 'apidoc' pass again on my machine.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
sphinx_ext: Allow documenting opcode results
Will be used by RAPI documentation.
Fix lint errors
It turns out that the only use of the operator module was foritemgetter, so patch eb62069e should have removed that import too.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Add two more compat functions
operator.itemgetter(0) → fstoperator.itemgetter(1) → snd
snd is not used yet, but it makes sense to add both.
Fix lint error
RAPI: Document all feature strings
- Use constants and an assertion- Update documentation for node migration
Add query field flags
Some fields (e.g. “name”) should be treated specially when comparing forequality. Hypervisor names should use normal rules, but for node names,“node2” should be equivalent with “node2.example.com”.
To make these differences, a new field for flags is added to the query...
Add script to generate query fields documentation
- All lines matching "QUERY_FIELDS_${resource}" in the input will be replaced with a definition list describing the fields for $resource- The core code is kept in the Sphinx extension, so that it could be...
QUERY_FIELDS_${resource}
Fix build error when using docutils 0.4
Docutils 0.4 doesn't provide the “Directive” class and Sphinx suppliesits own version which doesn't have the “assert_has_content” method.
Add pylint disables to Sphinx extension
Sphinx extension: Allow evaluation of Python expressions
There are quite many hardcoded constants (e.g. “[…] one of ``file``,``lvm-pv`` or ``lvm-vg`` […]). By using constants it'll be easier toidentify these.
With such lists of values it's also easy to miss some when...
Sphinx extension: Don't use “from … import …”
Import with full name instead to reduce potential conflicts.
Add sphinx extension
For now this just registers a single new directive, “opcode_params”,which can be used to generate opcode parameter documentation.