from ganeti import opcodes
from ganeti import ssconf
+
class LogicalUnit(object):
"""Logical Unit base class.
iv_name=iv_name)
return drbd_dev
+
def _GenerateDiskTemplate(cfg, template_name,
instance_name, primary_node,
secondary_nodes, disk_sz, swap_sz):
from ganeti import ssconf
from ganeti import logger
+
class Processor(object):
"""Object which runs OpCodes"""
DISPATCH_TABLE = {
__bool__ = __nonzero__
+
class Node(TaggableObject):
"""Config object representing a node."""
__slots__ = TaggableObject.__slots__ + [
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"
from ganeti import objects
from ganeti import ssconf
+
class NodeController:
"""Node-handling class.
debug = False
+
class RunResult(object):
"""Simple class for holding the result of running external programs.
from ganeti import opcodes
from ganeti import constants
+
def PrintExportList(opts, args):
"""Prints a list of all the exported system images.
_SHUTDOWN_NODES_SEC = "nodes-sec"
_SHUTDOWN_INSTANCES = "instances"
+
def _ExpandMultiNames(mode, names):
"""Expand the given names using the passed mode.
SubmitOpCode(op)
return 0
+
def RebootInstance(opts, args):
"""Reboot an instance
SubmitOpCode(op)
return 0
+
def ShutdownInstance(opts, args):
"""Shutdown an instance.
"""
pass
+
def Usage():
"""Shows program usage information and exits the program."""