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....
Rename lib/build/rpc_definitions.py to lib/rpc_defs.py
It will also be used at runtime, not just for building.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Add missing get_migration_status RPC definition
Add the instance_get_migration_status RPC definition and the neededhelper.
Signed-off-by: Andrea Spadaccini <spadaccio@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
rpc: Remove leftovers from timeout table
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
rpc: Convert last two calls to generated code
These two calls, “upload_file” and “write_ssconf_files” are treatedseparated as they're used by the configuration, where we can't use thenormal resolver.
There's still some duplicated code in rpc.py, but that will be taken...
rpc: Convert call for HV parameter validation
Instead of filling the parameters in the RPC layer, that is now donebefore the wrapper is called, thereby simplifying the wrapper.
rpc: Convert two more instance-specific calls
Interface changes were necessary as these took more parameters than wereactually passed over the wire. Those parameters were just passed to theinstance serialization function.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Move bootstrap-related RPC to generated wrappers
With this patch, only 6 RPC are left as old-style code.
Convert job queue's RPC to generated code
With these changes job queue RPC will finally show up on the lockmonitor. See below for an example. A job queue-specific class is used torestrict the use of a static list for name resolution to the job queue.Further improvements can be made to not re-create the whole RPC client...
rpc: Convert wrappers for starting import/export daemons
rpc: Convert storage-related calls
rpc: Convert blockdev-related calls
rpc: Convert instance-related calls
rpc: Convert misc calls
rpc: Convert file-storage-related calls
rpc: Convert node-related calls
rpc: Convert OS-related calls
rpc: Convert X509 calls
rpc: Convert import/export functions
Add RPC definitions
These will be used for replacing the tons and tons of boilerplate codein rpc.py.
rpc_definitions: Add helpers
These helpers will be used to convert incoming parameters toJSON-compatible types.
Add script to generate RPC wrappers
A new script, “autotools/build-rpc”, will be used to generate code forRPC client wrappers. This is done because “lib/rpc.py” contains lots andlots of boilerplate code. Forthcoming patches will start convertingRPC wrappers....
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.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Fix lint error
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
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.
Add targeted pylint disables
This patch should have only:
- pylint disables- docstring changes- whitespace changes
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Move LoadModule function to ganeti.build
It should only be used at build-time.
Add new ganeti.build namespace
This will be used to store build-time Python code.