Ensure we run ssh_ping before trying sofware verification on the
machine that requires ssh, so that we don't get obscure error messages
when the host is down.
To do this, we want to run all the site h/w verification stuff first,
then generic ssh pings, then site s/w stuff, so I broke this into
two functions
Signed-off-by: Martin Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2788 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py
index 14a8d17..f8257b6 100644
--- a/server/hosts/abstract_ssh.py
+++ b/server/hosts/abstract_ssh.py
@@ -309,7 +309,7 @@
def verify(self):
- super(AbstractSSHHost, self).verify()
+ super(AbstractSSHHost, self).verify_hardware()
print 'Pinging host ' + self.hostname
self.ssh_ping()
@@ -317,6 +317,8 @@
if self.is_shutting_down():
raise error.AutoservHostError("Host is shutting down")
+ super(AbstractSSHHost, self).verify_software()
+
try:
autodir = autotest._get_autodir(self)
if autodir:
diff --git a/server/hosts/base_classes.py b/server/hosts/base_classes.py
index 52032ac..e96bb83 100644
--- a/server/hosts/base_classes.py
+++ b/server/hosts/base_classes.py
@@ -172,6 +172,14 @@
pass
+ def verify_hardware(self):
+ pass
+
+
+ def verify_software(self):
+ pass
+
+
def check_diskspace(self, path, gb):
print 'Checking for >= %s GB of space under %s on machine %s' % \
(gb, path, self.hostname)