Skip to content
Snippets Groups Projects
  • Iustin Pop's avatar
    Convert from auto-generated RAPI docs to static · 6d81475c
    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: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    6d81475c
rapi.rst 9.03 KiB

Ganeti remote API

Documents Ganeti version 2.0

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

Python