From 7c0d62838c47e88e7c277414b5e7e37d7ef96505 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Wed, 5 Mar 2008 14:39:41 +0000 Subject: [PATCH] Codestyle fixes: adding a few empty lines Reviewed-by: ultrotter --- lib/cmdlib.py | 2 ++ lib/mcpu.py | 1 + lib/objects.py | 1 + lib/opcodes.py | 2 ++ lib/rpc.py | 1 + lib/utils.py | 1 + scripts/gnt-backup | 1 + scripts/gnt-instance | 3 +++ tools/lvmstrap | 1 + 9 files changed, 13 insertions(+) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 1c5356e..5c1be18 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -43,6 +43,7 @@ from ganeti import objects from ganeti import opcodes from ganeti import ssconf + class LogicalUnit(object): """Logical Unit base class. @@ -2739,6 +2740,7 @@ def _GenerateDRBD8Branch(cfg, primary, secondary, size, names, iv_name): iv_name=iv_name) return drbd_dev + def _GenerateDiskTemplate(cfg, template_name, instance_name, primary_node, secondary_nodes, disk_sz, swap_sz): diff --git a/lib/mcpu.py b/lib/mcpu.py index cd1a3a9..c5bcc8d 100644 --- a/lib/mcpu.py +++ b/lib/mcpu.py @@ -38,6 +38,7 @@ from ganeti import config from ganeti import ssconf from ganeti import logger + class Processor(object): """Object which runs OpCodes""" DISPATCH_TABLE = { diff --git a/lib/objects.py b/lib/objects.py index 6dd5141..b782c26 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -648,6 +648,7 @@ class OS(ConfigObject): __bool__ = __nonzero__ + class Node(TaggableObject): """Config object representing a node.""" __slots__ = TaggableObject.__slots__ + [ diff --git a/lib/opcodes.py b/lib/opcodes.py index 87bcf05..93ea6ed 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -275,12 +275,14 @@ class OpDiagnoseOS(OpCode): OP_ID = "OP_OS_DIAGNOSE" __slots__ = [] + # Exports opcodes class OpQueryExports(OpCode): """Compute the list of exported images.""" OP_ID = "OP_BACKUP_QUERY" __slots__ = ["nodes"] + class OpExportInstance(OpCode): """Export an instance.""" OP_ID = "OP_BACKUP_EXPORT" diff --git a/lib/rpc.py b/lib/rpc.py index 0e4b5dc..51b1d2e 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -38,6 +38,7 @@ from ganeti import constants from ganeti import objects from ganeti import ssconf + class NodeController: """Node-handling class. diff --git a/lib/utils.py b/lib/utils.py index 6cbd268..3319e71 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -51,6 +51,7 @@ _re_shell_unquoted = re.compile('^[-.,=:/_+@A-Za-z0-9]+$') debug = False + class RunResult(object): """Simple class for holding the result of running external programs. diff --git a/scripts/gnt-backup b/scripts/gnt-backup index dc456e1..a05e1ff 100755 --- a/scripts/gnt-backup +++ b/scripts/gnt-backup @@ -27,6 +27,7 @@ from ganeti import cmdlib from ganeti import opcodes from ganeti import constants + def PrintExportList(opts, args): """Prints a list of all the exported system images. diff --git a/scripts/gnt-instance b/scripts/gnt-instance index d5661d3..7d3aa94 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -39,6 +39,7 @@ _SHUTDOWN_NODES_PRI = "nodes-pri" _SHUTDOWN_NODES_SEC = "nodes-sec" _SHUTDOWN_INSTANCES = "instances" + def _ExpandMultiNames(mode, names): """Expand the given names using the passed mode. @@ -382,6 +383,7 @@ def StartupInstance(opts, args): SubmitOpCode(op) return 0 + def RebootInstance(opts, args): """Reboot an instance @@ -407,6 +409,7 @@ def RebootInstance(opts, args): SubmitOpCode(op) return 0 + def ShutdownInstance(opts, args): """Shutdown an instance. diff --git a/tools/lvmstrap b/tools/lvmstrap index 153de88..8fbe1fb 100755 --- a/tools/lvmstrap +++ b/tools/lvmstrap @@ -110,6 +110,7 @@ class ParameterError(Error): """ pass + def Usage(): """Shows program usage information and exits the program.""" -- 1.7.10.4