[asterisk-scf-commits] asterisk-scf/integration/testsuite.git branch "review" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue May 24 19:30:30 CDT 2011


branch "review" has been updated
       via  a0f304403d3e7e3d60d8e4e629d4dd5a5b7545cc (commit)
      from  8dba004df47f752be774a611213eef53dffab065 (commit)

Summary of changes:
 plugins/build.py |    2 +-
 remote.py        |   14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit a0f304403d3e7e3d60d8e4e629d4dd5a5b7545cc
Author: Darren Sessions <dsessions at digium.com>
Date:   Tue May 24 19:30:28 2011 -0500

    finished up build plugin

diff --git a/plugins/build.py b/plugins/build.py
index 39e37a2..0b219b2 100644
--- a/plugins/build.py
+++ b/plugins/build.py
@@ -69,7 +69,7 @@ class testsuite(util.TestSuiteRemoteBaseClass):
                     return results
                
                 for remote in testData['cmd']['redistribute']['remotes']:
-                    results = rpc.getFileFromRemote(remote, 'tmp.tar.gz')
+                    results = rpc.serverSideSendFile(remote, 'tmp.tar.gz')
                     if results['success'] == False:
                         return results
 
diff --git a/remote.py b/remote.py
index 7b827ea..6fba2aa 100755
--- a/remote.py
+++ b/remote.py
@@ -198,14 +198,16 @@ class RemoteManagement(object):
         f.close()
         return {'success':True}
 
-    def sendFileToRemote(self, fn, data):
-        with open('%s/tmp/%s' % (cwd, fn), "wb") as fh:
-            fh.write(data)
+    def remoteSideRecvFile(self, fn, fd):
+        w = open('%s/tmp/%s' % (cwd, fn), "wb")
+        wc = w.write(fd.data)
+        w.close
+        return {'success':'True'}
 
-    def getFileFromRemote(self, remote, fn):
+    def serverSideSendFile(self, remote, fn):
         rpc = xmlrpclib.ServerProxy('http://%s:8000/' % remote)
-        with open('%s/tmp/%s' % (cwd, fn), "rb") as fh:
-            rpc.sendFileToRemote(fn, xmlrpclib.Binary(fh.read()).data)
+        r = open("ls", "rb")
+        return rpc.remoteSideRecvFile(fn, xmlrpclib.Binary(r.read()))
 
     def reset(self):
         os.chdir('%s/tmp' % cwd)

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list