incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mry...@apache.org
Subject svn commit: r750119 - /incubator/tashi/trunk/src/tashi/client/tashi-client.py
Date Wed, 04 Mar 2009 19:37:07 GMT
Author: mryan3
Date: Wed Mar  4 19:37:07 2009
New Revision: 750119

URL: http://svn.apache.org/viewvc?rev=750119&view=rev
Log:
Bug fix to getVmLayout.  This removes the error that occurs when a VM's creation is pending,
but it has not yet been placed on a machine.


Modified:
    incubator/tashi/trunk/src/tashi/client/tashi-client.py

Modified: incubator/tashi/trunk/src/tashi/client/tashi-client.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/client/tashi-client.py?rev=750119&r1=750118&r2=750119&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/client/tashi-client.py (original)
+++ incubator/tashi/trunk/src/tashi/client/tashi-client.py Wed Mar  4 19:37:07 2009
@@ -120,13 +120,16 @@
 	hosts = {}
 	for h in _hosts:
 		h.instances = []
+		h.instanceIds = []
 		h.usedMemory = 0
 		h.usedCores = 0
 		hosts[h.id] = h
 	for i in _instances:
-		hosts[i.hostId].instances.append(i.id)
-		hosts[i.hostId].usedMemory += i.memory
-		hosts[i.hostId].usedCores += i.cores
+		if (i.hostId in hosts):
+			hosts[i.hostId].instanceIds.append(i.id)
+			hosts[i.hostId].instances.append(i.name)
+			hosts[i.hostId].usedMemory += i.memory
+			hosts[i.hostId].usedCores += i.cores
 	return hosts.values()
 
 def createMany(instance, count):



Mime
View raw message