[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2007-01-10 22:45:35

Modified files:
	luci/site/luci/Extensions: cluster_adapters.py 

Log message:
	sort the list of fence devices to preserve the ordering intended

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.198&r2=1.199

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/10 21:40:05	1.198
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/10 22:45:35	1.199
@@ -1503,7 +1503,7 @@
 			raise Exception, 'No method ID'
 		fence_method = Method()
 		fence_method.addAttribute('name', str(method_id))
-		node.children[0].children[fence_level_num - 1] = fence_method
+		levels[fence_level_num - 1] = fence_method
 	except Exception, e:
 		method_id = fence_level
 		fence_method = Method()
@@ -1571,7 +1571,9 @@
 		else:
 			form_hash[form_id] = (dummy_form, list())
 
-	for i in form_hash:
+	fh_keys = form_hash.keys()
+	fh_keys.sort()
+	for i in fh_keys:
 		fencedev_name = None
 		fencedev_unknown = False
 		fencedev_obj = None
@@ -1650,7 +1652,6 @@
 					# Add back the tags under the method block
 					# for the fence instance
 					instance_list.append({'name': fencedev_name })
-
 		else:
 			# The user created a new fence device.
 			fencedev_name = fence_form['name']
@@ -1739,7 +1740,6 @@
 			% str(e))
 		return (False, {'errors': [ 'An error occurred while constructing the new cluster configuration.' ]})
 
-
 	rc = getRicciAgent(self, clustername)
 	if not rc:
 		luci_log.debug_verbose('vNFC18: unable to find a ricci agent for cluster %s' % clustername)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]