incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1307682 - in /incubator/tashi/trunk: INSTALL src/tashi/clustermanager/clustermanagerservice.py
Date Sat, 31 Mar 2012 01:20:52 GMT
Author: stroucki
Date: Sat Mar 31 01:20:52 2012
New Revision: 1307682

URL: http://svn.apache.org/viewvc?rev=1307682&view=rev
Log:
INSTALL: use 0 offset for initial objects
clustermanagerservice: use network id, not database position to determine default network

Modified:
    incubator/tashi/trunk/INSTALL
    incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py

Modified: incubator/tashi/trunk/INSTALL
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/INSTALL?rev=1307682&r1=1307681&r2=1307682&view=diff
==============================================================================
--- incubator/tashi/trunk/INSTALL (original)
+++ incubator/tashi/trunk/INSTALL Sat Mar 31 01:20:52 2012
@@ -153,9 +153,9 @@ Please press <RETURN> to start IPython.
 
 In [1]: from tashi.rpycservices.rpyctypes import Host, HostState, Network
 
-In [2]: data.baseDataObject.hosts[1] = Host(d={'id':1,'name':'grml','state': HostState.Normal,'up':False})
+In [2]: data.baseDataObject.hosts[0] = Host(d={'id':0,'name':'grml','state': HostState.Normal,'up':False})
 
-In [3]: data.baseDataObject.networks[1]=Network(d={'id':0,'name':'default'})
+In [3]: data.baseDataObject.networks[0]=Network(d={'id':0,'name':'My Network'})
 
 In [4]: data.baseDataObject.save()
 

Modified: incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py?rev=1307682&r1=1307681&r2=1307682&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py (original)
+++ incubator/tashi/trunk/src/tashi/clustermanager/clustermanagerservice.py Sat Mar 31 01:20:52
2012
@@ -546,8 +546,9 @@ class ClusterManagerService(object):
 	
 	def getNetworks(self):
 		networks = self.data.getNetworks()
-		if self.defaultNetwork in networks:
-			setattr(networks[self.defaultNetwork], "default", True)
+		for network in networks:
+			if self.defaultNetwork == networks[network].id:
+				setattr(networks[network], "default", True)
 
 		return networks.values()
 



Mime
View raw message