Package ganeti :: Package client :: Module gnt_backup
[hide private]
[frames] | no frames]

Module gnt_backup

source code

Backup related commands

Functions [hide private]
int
PrintExportList(opts, args)
Prints a list of all the exported system images.
source code
int
ExportInstance(opts, args)
Export an instance to an image in the cluster.
source code
 
ImportInstance(opts, args)
Add an instance to the cluster.
source code
int
RemoveExport(opts, args)
Remove an export from the cluster.
source code
 
Main() source code
Variables [hide private]
  _VALUE_TRUE = "true"
  import_opts = [IDENTIFY_DEFAULTS_OPT, SRC_DIR_OPT, SRC_NODE_OPT,]
  commands = {'list':(PrintExportList, ARGS_NONE, [NODE_LIST_OPT...

Imports: opcodes, constants, errors


Function Details [hide private]

PrintExportList(opts, args)

source code 

Prints a list of all the exported system images.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should be an empty list
Returns: int
the desired exit code

ExportInstance(opts, args)

source code 

Export an instance to an image in the cluster.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the name of the instance to be exported
Returns: int
the desired exit code

ImportInstance(opts, args)

source code 

Add an instance to the cluster.

This is just a wrapper over GenericInstanceCreate.

RemoveExport(opts, args)

source code 

Remove an export from the cluster.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should contain only one element, the name of the instance whose backup should be removed
Returns: int
the desired exit code

Variables Details [hide private]

commands

Value:
{'list':(PrintExportList, ARGS_NONE, [NODE_LIST_OPT], "", "Lists insta\
nce exports available in the ganeti cluster"), 'export':(ExportInstanc\
e, ARGS_ONE_INSTANCE, [FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHU\
TDOWN_TIMEOUT_OPT, REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT, DR\
Y_RUN_OPT, PRIORITY_OPT], "-n <target_node> [opts...] <name>", "Export\
s an instance to an image"), 'import':(ImportInstance, ARGS_ONE_INSTAN\
CE, COMMON_CREATE_OPTS+ import_opts, "[...] -t disk-type -n node[:seco\
ndary-node] <name>", "Imports an instance from an exported image"), 'r\
...