Script gnt_os
[hide private]
[frames] | no frames]

Script gnt_os

OS scripts related commands

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

Imports: sys, constants, opcodes, utils


Function Details [hide private]

ListOS(opts, args)

 

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)

 

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)

 

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)

 

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)

 

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], "", "Lists all valid operatin\
g systems" " on the cluster"), 'diagnose':(DiagnoseOS, ARGS_NONE, [], \
"", "Diagnose all operating systems"), 'info':(ShowOSInfo, [ArgOs()], \
[], "", "Show detailed information about " "operating systems"), 'modi\
fy':(ModifyOS, ARGS_ONE_OS, [HVLIST_OPT, OSPARAMS_OPT, DRY_RUN_OPT, HI\
D_OS_OPT, BLK_OS_OPT], "", "Modify the OS parameters"),}