Fix spacing everywhere ;-(
Signed-off-by: Martin J. Bligh <[email protected]>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@605 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/base_classes.py b/server/hosts/base_classes.py
index 4564fc1..5ee7572 100644
--- a/server/hosts/base_classes.py
+++ b/server/hosts/base_classes.py
@@ -2,7 +2,8 @@
#
# Copyright 2007 Google Inc. Released under the GPL v2
-"""This module defines the base classes for the Host hierarchy.
+"""
+This module defines the base classes for the Host hierarchy.
Implementation details:
You should import the "hosts" package instead of importing each type of host.
@@ -12,9 +13,11 @@
CmdResult: contain the results of a Host.run() command execution
"""
-__author__ = """[email protected] (Martin J. Bligh),
+__author__ = """
[email protected] (Martin J. Bligh),
[email protected] (Benjamin Poirier),
[email protected] (Ryan Stutsman)"""
[email protected] (Ryan Stutsman)
+"""
import time
@@ -22,49 +25,61 @@
import bootloader
class Host(object):
- """This class represents a machine on which you can run programs.
-
+ """
+ This class represents a machine on which you can run programs.
+
It may be a local machine, the one autoserv is running on, a remote
machine or a virtual machine.
-
+
Implementation details:
This is an abstract class, leaf subclasses must implement the methods
listed here. You must not instantiate this class but should
- instantiate one of those leaf subclasses."""
-
+ instantiate one of those leaf subclasses.
+ """
+
bootloader = None
-
+
def __init__(self):
super(Host, self).__init__()
self.bootloader= bootloader.Bootloader(self)
-
+
+
def run(self, command):
pass
-
+
+
def reboot(self):
pass
-
+
+
def get_file(self, source, dest):
pass
-
+
+
def send_file(self, source, dest):
pass
-
+
+
def get_tmp_dir(self):
pass
-
+
+
def is_up(self):
pass
-
+
+
def wait_up(self, timeout):
pass
-
+
+
def wait_down(self, timeout):
pass
-
+
+
def get_num_cpu(self):
pass
-
+
+
def install(self, installableObject):
installableObject.install(self)
@@ -85,19 +100,19 @@
class RemoteHost(SiteHost):
"""This class represents a remote machine on which you can run
programs.
-
+
It may be accessed through a network, a serial line, ...
It is not the machine autoserv is running on.
-
+
Implementation details:
This is an abstract class, leaf subclasses must implement the methods
listed here and in parent classes which have no implementation. They
may reimplement methods which already have an implementation. You
must not instantiate this class but should instantiate one of those
leaf subclasses."""
-
+
hostname= None
-
+
def __init__(self):
super(RemoteHost, self).__init__()
@@ -105,12 +120,12 @@
class CmdResult(object):
"""
Command execution result.
-
+
Modified from the original Autoserv code, local_cmd.py:
Copyright [email protected] (Jonathan Mayer),
[email protected] (Martin J. Bligh)
Released under the GPL, v2
-
+
command: String containing the command line itself
exit_status: Integer exit code of the process
stdout: String containing stdout of the process
@@ -118,7 +133,7 @@
duration: Elapsed wall clock time running the process
aborted: Signal that caused the command to terminate (0 if none)
"""
-
+
def __init__(self):
super(CmdResult, self).__init__()
self.command = ""
@@ -127,7 +142,8 @@
self.stderr = ""
self.duration = 0
self.aborted= False
-
+
+
def __repr__(self):
wrapper= textwrap.TextWrapper(width=78,
initial_indent="\n ", subsequent_indent=" ")