Commit 6099bfcf authored by Iustin Pop's avatar Iustin Pop
Browse files

Documentation updates for gnt-debug and gnt-os

Reviewed-by: imsnah
parent 917b4e56
......@@ -39,6 +39,13 @@ from ganeti import errors
def Delay(opts, args):
"""Sleeps for a while
@param opts: the command line options selected by the user
@type args: list
@param args: should contain only one element, the duration
the sleep
@rtype: int
@return: the desired exit code
"""
delay = float(args[0])
op = opcodes.OpTestDelay(duration=delay,
......@@ -50,7 +57,16 @@ def Delay(opts, args):
def GenericOpCodes(opts, args):
"""Send any opcode to the master
"""Send any opcode to the master.
@todo: The function is broken and needs to be converted to the
current job queue API
@param opts: the command line options selected by the user
@type args: list
@param args: should contain only one element, the path of
the file with the opcode definition
@rtype: int
@return: the desired exit code
"""
fname = args[0]
......@@ -96,8 +112,15 @@ def GenericOpCodes(opts, args):
def TestAllocator(opts, args):
"""Runs the test allocator opcode"""
"""Runs the test allocator opcode.
@param opts: the command line options selected by the user
@type args: list
@param args: should contain only one element, the iallocator name
@rtype: int
@return: the desired exit code
"""
try:
disks = [{"size": utils.ParseUnit(val), "mode": 'w'}
for val in opts.disks.split(",")]
......
......@@ -33,7 +33,13 @@ from ganeti import constants
def ListOS(opts, args):
"""List the OSes existing on this node.
"""List the valid OSes in the cluster.
@param opts: the command line options selected by the user
@type args: list
@param args: should be an empty list
@rtype: int
@return: the desired exit code
"""
op = opcodes.OpDiagnoseOS(output_fields=["name", "valid"], names=[])
......@@ -60,6 +66,12 @@ def ListOS(opts, args):
def DiagnoseOS(opts, args):
"""Analyse all OSes on this cluster.
@param opts: the command line options selected by the user
@type args: list
@param args: should be an empty list
@rtype: int
@return: the desired exit code
"""
op = opcodes.OpDiagnoseOS(output_fields=["name", "valid", "node_status"],
names=[])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment