-
Iustin Pop authored
This patch removes the autogeneration of the RAPI docs from the code (based on docstrings) and moves the current autogenerated output to the rapi.rst file. The reasons behind this are multiple: - the build system becomes a little more simple (this could have been achieved also by distributing the built documentation, though) - it's hard to actually write documentation in docstrings; you have to fit restructured text inside the docstrings, and this results in not really nice output - even by being close to the code, the documentation manages to get out of sync (not paying attention to docstrings) This will also help with the move to sphinx. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
6d81475c
rapi.rst 9.03 KiB
Ganeti remote API
Documents Ganeti version 2.0
Contents
- Introduction
- Protocol
- Usage examples
-
Resources
- /
- /2
- /2/info
- /2/instances
- /2/instances/[instance_name]
- /2/instances/[instance_name]/reboot
- /2/instances/[instance_name]/shutdown
- /2/instances/[instance_name]/startup
- /2/instances/[instance_name]/tags
- /2/jobs
- /2/jobs/[job_id]
- /2/nodes
- /2/nodes/[node_name]/tags
- /2/os
- /2/tags
- /nodes/[node_name]
- /version
Introduction
Ganeti supports a remote API for enable external tools to easily
retrieve information about a cluster's state. The remote API daemon,
ganeti-rapi, is automatically started on the master node. By default
it runs on TCP port 5080, but this can be changed either in
.../constants.py
or via the command line parameter -p. SSL mode,
which is used by default, can also be disabled by passing command line
parameters.
Protocol
The protocol used is JSON over HTTP designed after the REST principle.
Usage examples
You can access the API using your favorite programming language as long as it supports network connections.
Shell
Using wget:
wget -q -O - https://CLUSTERNAME:5080/2/info
or curl:
curl https://CLUSTERNAME:5080/2/info