[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
Branch: 	RHEL4
Changes by:	rmccabe sourceware org	2007-03-16 03:19:01

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

Log message:
	Fix a bug in the code that ensures FSIDs for fs and cluster fs resources are unique.

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/03/15 22:09:58	1.227.2.17
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/03/16 03:19:00	1.227.2.18
@@ -60,8 +60,8 @@
 	obj_list.extend(model.searchObjectTree('clusterfs'))
 	return map(lambda x: x.getAttribute('fsid') and int(x.getAttribute('fsid')) or 0, obj_list)
 
-def fsid_is_unique(fsid):
-	fsid_list = get_fsid_list
+def fsid_is_unique(model, fsid):
+	fsid_list = get_fsid_list(model)
 	return fsid not in fsid_list
 
 def generate_fsid(model, name):
@@ -6150,7 +6150,7 @@
 		if not fsid:
 			raise Exception, 'No filesystem ID was given for this filesystem resource.'
 		fsid_int = int(fsid)
-		if not fsid_is_unique(fsid_int):
+		if not fsid_is_unique(model, fsid_int):
 			raise Exception, 'The filesystem ID provided is not unique.'
 	except Exception, e:
 		fsid = str(generate_fsid(model, name))
@@ -6267,7 +6267,7 @@
 		if not fsid:
 			raise Exception, 'No filesystem ID was given for this cluster filesystem resource.'
 		fsid_int = int(fsid)
-		if not fsid_is_unique(fsid_int):
+		if not fsid_is_unique(model, fsid_int):
 			raise Exception, 'The filesystem ID provided is not unique.'
 	except Exception, e:
 		fsid = str(generate_fsid(model, name))


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