Package ganeti :: Package build :: Module sphinx_ext
[hide private]
[frames] | no frames]

Module sphinx_ext

source code

Sphinx extension for building opcode documentation.

Classes [hide private]
  OpcodeError
  OpcodeParams
Custom directive for opcode parameters.
  OpcodeResult
Custom directive for opcode result.
  PythonAssert
Custom directive for writing assertions.
Functions [hide private]
 
_SplitOption(text)
Split simple option list.
source code
dict
_ParseAlias(text)
Parse simple assignment option.
source code
 
_BuildOpcodeParams(op_id, include, exclude, alias)
Build opcode parameter documentation.
source code
 
_BuildOpcodeResult(op_id)
Build opcode result documentation.
source code
 
PythonEvalRole(role, rawtext, text, lineno, inliner, options={}, content=[])
Custom role to evaluate Python expressions.
source code
 
BuildQueryFields(fields)
Build query fields documentation.
source code
 
setup(app)
Sphinx extension callback.
source code
Variables [hide private]
  s_compat = sphinx.util.compat
  COMMON_PARAM_NAMES = map(compat.fst, opcodes.OpCode.OP_PARAMS)
  EVAL_NS = dict(compat= compat, constants= constants, utils= ut...
Namespace for evaluating expressions

Imports: StringIO, docutils, sphinx, constants, compat, errors, utils, opcodes, ht, rapi, ganeti


Function Details [hide private]

_SplitOption(text)

source code 

Split simple option list.

Parameters:
  • text (string) - Options, e.g. "foo, bar, baz"

_ParseAlias(text)

source code 

Parse simple assignment option.

Parameters:
  • text (string) - Assignments, e.g. "foo=bar, hello=world"
Returns: dict

_BuildOpcodeParams(op_id, include, exclude, alias)

source code 

Build opcode parameter documentation.

Parameters:
  • op_id (string) - Opcode ID

_BuildOpcodeResult(op_id)

source code 

Build opcode result documentation.

Parameters:
  • op_id (string) - Opcode ID

PythonEvalRole(role, rawtext, text, lineno, inliner, options={}, content=[])

source code 

Custom role to evaluate Python expressions.

The expression's result is included as a literal.

BuildQueryFields(fields)

source code 

Build query fields documentation.

Parameters:
  • fields (dict (field name as key, field details as value))

Variables Details [hide private]

EVAL_NS

Namespace for evaluating expressions

Value:
dict(compat= compat, constants= constants, utils= utils, errors= error\
s, rlib2= rapi.rlib2)