import os, os.path
import datetime
import time
-
+from TestSsh import TestSsh
class TestSliver:
self.test_plc=test_plc
self.test_node=test_node
self.test_slice=test_slice
-
+ self.test_ssh =TestSsh(self.test_plc.test_ssh)
+
+ def is_local(self):
+ return self.test_ssh.is_local()
+
+ def host_to_guest(self,command):
+ return self.test_plc.host_to_guest(self.test_plc.vserver,self.test_plc.vservername,command)
+
def get_privateKey(self,slice_spec):
try:
(found,remote_privatekey)=self.test_slice.locate_key(slice_spec)
def do_check_tcp(self,tcp_param,options):
for tcp_spec in tcp_param:
#copy the tcptest file under the chroot
- path=options.path
- localfile=path+"/tcptest.py"
- remotefile="tcptest.py"
+ localfile=remotefile="tcptest.py"
self.test_plc.copy_in_guest(localfile, remotefile, False)
peer_param=tcp_spec['tcp_fields']
if (tcp_spec['tcp_fields']['peer_name']=='server'):