return self.hostname_value
def is_local(self):
- return TestSsh.is_local (self.hostname())
+ return self.test_ssh.is_local()
def tar_logs(self):
if os.path.isdir("nodeslogs"):
return self.plc_spec['hostname']
def is_local (self):
- return TestSsh.is_local(self.hostname())
+ return self.test_ssh.is_local()
# define the API methods on this object through xmlrpc
# would help, but not strictly necessary
return self.slice_spec['slice_fields']['name']
def is_local(self):
- return self.test_plc.is_local()
+ return self.test_ssh.is_local()
def host_to_guest(self,command):
return self.test_plc.host_to_guest(command)
self.test_ssh =TestSsh(self)
def is_local(self):
- return self.test_plc.is_local()
+ return self.test_ssh.is_local()
def host_to_guest(self,command):
return self.test_plc.host_to_guest(command)
# check main IP address against the provided hostname
@staticmethod
- def is_local (hostname):
+ def is_local_hostname (hostname):
if hostname == "localhost":
return True
import socket
remote_ip = socket.gethostbyname(hostname)
return local_ip==remote_ip
except:
- header("WARNING : something wrong in is_local with hostname=%s"%hostname)
+ header("WARNING : something wrong in is_local_hostname with hostname=%s"%hostname)
return False
def __init__(self,caller):
def hostname(self):
return self.caller.hostname()
def is_local(self):
- return self.caller.is_local()
+ return TestSsh.is_local_hostname(self.hostname())
def buildname(self):
return self.caller.buildname()
# command gets run on the right box
def to_host(self,command):
- if self.caller.is_local():
+ if self.is_local():
return command
else:
return "ssh %s %s"%(self.hostname(),TestSsh.backslash_shell_specials(command))