incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mry...@apache.org
Subject svn commit: r776423 - in /incubator/tashi/trunk/src/tashi/nodemanager: nodemanagerservice.py vmcontrol/qemu.py
Date Tue, 19 May 2009 19:20:10 GMT
Author: mryan3
Date: Tue May 19 19:20:10 2009
New Revision: 776423

URL: http://svn.apache.org/viewvc?rev=776423&view=rev
Log:
Remove unnecessary lambdas


Modified:
    incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py

Modified: incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py?rev=776423&r1=776422&r2=776423&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py Tue May 19 19:20:10
2009
@@ -163,7 +163,7 @@
 	def suspendVm(self, vmId, name, suspendCookie):
 		instance = self.getInstance(vmId)
 		instance.state = InstanceState.Suspending
-		threading.Thread(target=lambda: self.vmm.suspendVm(vmId, name, suspendCookie)).start()
+		threading.Thread(target=self.vmm.suspendVm, args=(vmId, name, suspendCookie)).start()
 	
 	@RPC
 	def resumeVm(self, instance, name):
@@ -188,7 +188,7 @@
 	def migrateVm(self, vmId, target, transportCookie):
 		instance = self.getInstance(vmId)
 		instance.state = InstanceState.MigrateTrans
-		threading.Thread(target=lambda: self.migrateVmHelper(instance, target, transportCookie)).start()
+		threading.Thread(target=self.migrateVmHelper, args=(instance, target, transportCookie)).start()
 		return
 	
 	def receiveVmHelper(self, instance, transportCookie):
@@ -211,7 +211,7 @@
 	@RPC
 	def receiveVm(self, instance, transportCookie):
 		instance.state = InstanceState.MigrateTrans
-		threading.Thread(target=lambda: self.receiveVmHelper(instance, transportCookie)).start()
+		threading.Thread(target=self.receiveVmHelper, args=(instance, transportCookie)).start()
 		return
 	
 	@RPC

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=776423&r1=776422&r2=776423&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Tue May 19 19:20:10 2009
@@ -205,7 +205,7 @@
 	def getControlConsole(self, vmId, port):
 		"""Spawn a thread that attaches the control console of a particular Qemu to a TCP port
-- used for debugging only"""
 		child = self.getChildFromPid(vmId)
-		threading.Thread(target=(lambda: controlConsole(child, port))).start()
+		threading.Thread(target=controlConsole, args=(child, port)).start()
 		return port
 	
 	def consumeAvailable(self, child):
@@ -568,7 +568,7 @@
 			consolePort = self.consolePort
 			self.consolePort = self.consolePort+1
 			self.consolePortLock.release()
-			threading.Thread(target=lambda: controlConsole(child,consolePort)).start()
+			threading.Thread(target=controlConsole, args=(child,consolePort)).start()
 			return "Control console listenting on %s:%d" % (hostname, consolePort)
 		elif (arg == "list"):
 			return "startVnc\nstopVnc\nchangeCdrom:<image.iso>\nstartConsole"



Mime
View raw message