From 48de341386f7bc0a12c117c978d4caad04c415a9 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 27 Oct 2008 23:19:45 +0000 Subject: [PATCH] Documentation updates for gnt-backup Reviewed-by: imsnah --- scripts/gnt-backup | 54 +++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/scripts/gnt-backup b/scripts/gnt-backup index 77c1fcb4f..112ed7506 100755 --- a/scripts/gnt-backup +++ b/scripts/gnt-backup @@ -36,12 +36,11 @@ _VALUE_TRUE = "true" def PrintExportList(opts, args): """Prints a list of all the exported system images. - Args: - opts - class with options as members (should be empty) - args - should be empty - - Returns: - nothing + @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 """ exports = GetClient().QueryExports(opts.nodes) @@ -61,12 +60,12 @@ def PrintExportList(opts, args): def ExportInstance(opts, args): """Export an instance to an image in the cluster. - Args: - opts - class with options as members - args - list with a single element, the instance name - - Returns: - 1 in case of error, 0 otherwise + @param opts: the command line options selected by the user + @type args: list + @param args: should contain only one element, the name + of the instance to be exported + @rtype: int + @return: the desired exit code """ op = opcodes.OpExportInstance(instance_name=args[0], @@ -79,19 +78,11 @@ def ExportInstance(opts, args): def ImportInstance(opts, args): """Add an instance to the cluster. - Args: - opts - class with options as members - args - list with a single element, the new instance name - Opts used: - memory - amount of memory to allocate to instance (MiB) - 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 + @param opts: the command line options selected by the user + @type args: list + @param args: should contain only one element, the new instance name + @rtype: int + @return: the desired exit code """ instance = args[0] @@ -128,13 +119,12 @@ def ImportInstance(opts, args): def RemoveExport(opts, args): """Remove an export from the cluster. - Args: - opts - class with options as members - args - list with a single element, the exported instance to remove - Opts used: - - Returns: - 1 in case of error, 0 otherwise + @param opts: the command line options selected by the user + @type args: list + @param args: should contain only one element, the name of the + instance whose backup should be removed + @rtype: int + @return: the desired exit code """ instance = args[0] -- GitLab