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

Module gnt_os

source code

OS scripts related commands

Functions [hide private]
int
ListOS(opts, args)
List the valid OSes in the cluster.
source code
int
ShowOSInfo(opts, args)
List detailed information about OSes in the cluster.
source code
string
_OsStatus(status, diagnose)
Beautifier function for OS status.
source code
int
DiagnoseOS(opts, args)
Analyse all OSes on this cluster.
source code
int
ModifyOS(opts, args)
Modify OS parameters for one OS.
source code
 
Main() source code
Variables [hide private]
  commands = {"list":(ListOS, ARGS_NONE, [NOHDR_OPT, PRIORITY_OP...

Imports: constants, opcodes, utils


Function Details [hide private]

ListOS(opts, args)

source code 

List the valid OSes in the cluster.

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

ShowOSInfo(opts, args)

source code 

List detailed information about OSes in the cluster.

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

_OsStatus(status, diagnose)

source code 

Beautifier function for OS status.

Parameters:
  • status (boolean) - is the OS valid
  • diagnose (string) - the error message for invalid OSes
Returns: string
a formatted status

DiagnoseOS(opts, args)

source code 

Analyse all OSes on this cluster.

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

ModifyOS(opts, args)

source code 

Modify OS parameters for one OS.

Parameters:
  • opts - the command line options selected by the user
  • args (list) - should be a list with one entry
Returns: int
the desired exit code

Variables Details [hide private]

commands

Value:
{"list":(ListOS, ARGS_NONE, [NOHDR_OPT, PRIORITY_OPT], "", "Lists all \
valid operating systems on the cluster"), "diagnose":(DiagnoseOS, ARGS\
_NONE, [PRIORITY_OPT], "", "Diagnose all operating systems"), "info":(\
ShowOSInfo, [ArgOs()], [PRIORITY_OPT], "", "Show detailed information \
about " "operating systems"), "modify":(ModifyOS, ARGS_ONE_OS, [HVLIST\
_OPT, OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT, HID_OS_OPT, BLK_OS_OPT]\
, "", "Modify the OS parameters"),}