-#
-# $Id$
-# $URL$
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2010 INRIA
#
import utils
import os, os.path
found=True
return (found,privatekey)
- def check_slice(self,options,timeout_minutes=20,silent_minutes=10,period=15):
+ def ssh_slice(self,options,timeout_minutes=20,silent_minutes=10,period=15):
timeout = datetime.datetime.now()+datetime.timedelta(minutes=timeout_minutes)
graceout = datetime.datetime.now()+datetime.timedelta(minutes=silent_minutes)
# locate a key
date_test_ssh = TestSsh (hostname,key=remote_privatekey,username=self.name())
command = date_test_ssh.actual_command("echo hostname ; hostname; echo id; id; echo uname -a ; uname -a")
date = utils.system (command, silent=datetime.datetime.now() < graceout)
- if date:
+ if date==0:
utils.header("Successfuly entered slice %s on %s"%(self.name(),hostname))
tocheck.remove(hostname)
else: