pass the MAC address and the HOSTNAME to the qemu conf file
[tests.git] / system / TestSliver.py
index 527a519..654e401 100644 (file)
@@ -2,7 +2,7 @@ import utils
 import os, os.path
 import datetime
 import time
-
+from TestSsh import TestSsh
 
 class TestSliver:
 
@@ -10,7 +10,14 @@ 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)
@@ -49,9 +56,7 @@ class TestSliver:
     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'):