Skip to content
Snippets Groups Projects
Commit 48de3413 authored by Iustin Pop's avatar Iustin Pop
Browse files

Documentation updates for gnt-backup

Reviewed-by: imsnah
parent d70b3058
No related branches found
No related tags found
No related merge requests found
...@@ -36,12 +36,11 @@ _VALUE_TRUE = "true" ...@@ -36,12 +36,11 @@ _VALUE_TRUE = "true"
def PrintExportList(opts, args): def PrintExportList(opts, args):
"""Prints a list of all the exported system images. """Prints a list of all the exported system images.
Args: @param opts: the command line options selected by the user
opts - class with options as members (should be empty) @type args: list
args - should be empty @param args: should be an empty list
@rtype: int
Returns: @return: the desired exit code
nothing
""" """
exports = GetClient().QueryExports(opts.nodes) exports = GetClient().QueryExports(opts.nodes)
...@@ -61,12 +60,12 @@ def PrintExportList(opts, args): ...@@ -61,12 +60,12 @@ def PrintExportList(opts, args):
def ExportInstance(opts, args): def ExportInstance(opts, args):
"""Export an instance to an image in the cluster. """Export an instance to an image in the cluster.
Args: @param opts: the command line options selected by the user
opts - class with options as members @type args: list
args - list with a single element, the instance name @param args: should contain only one element, the name
of the instance to be exported
Returns: @rtype: int
1 in case of error, 0 otherwise @return: the desired exit code
""" """
op = opcodes.OpExportInstance(instance_name=args[0], op = opcodes.OpExportInstance(instance_name=args[0],
...@@ -79,19 +78,11 @@ def ExportInstance(opts, args): ...@@ -79,19 +78,11 @@ def ExportInstance(opts, args):
def ImportInstance(opts, args): def ImportInstance(opts, args):
"""Add an instance to the cluster. """Add an instance to the cluster.
Args: @param opts: the command line options selected by the user
opts - class with options as members @type args: list
args - list with a single element, the new instance name @param args: should contain only one element, the new instance name
Opts used: @rtype: int
memory - amount of memory to allocate to instance (MiB) @return: the desired exit code
size - amount of disk space to allocate to instance (MiB)
os - which OS to run on instance
node - node to run new instance on
src_node - node containing the export
src_dir - directory on the old node with the export in it
Returns:
1 in case of error, 0 otherwise
""" """
instance = args[0] instance = args[0]
...@@ -128,13 +119,12 @@ def ImportInstance(opts, args): ...@@ -128,13 +119,12 @@ def ImportInstance(opts, args):
def RemoveExport(opts, args): def RemoveExport(opts, args):
"""Remove an export from the cluster. """Remove an export from the cluster.
Args: @param opts: the command line options selected by the user
opts - class with options as members @type args: list
args - list with a single element, the exported instance to remove @param args: should contain only one element, the name of the
Opts used: instance whose backup should be removed
@rtype: int
Returns: @return: the desired exit code
1 in case of error, 0 otherwise
""" """
instance = args[0] instance = args[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment