[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...
rmccabe at sourceware.org
rmccabe at sourceware.org
Fri Mar 16 03:19:40 UTC 2007
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-03-16 03:19:40
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&r1=1.250&r2=1.251
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2007/03/15 22:08:42 1.250
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/03/16 03:19:39 1.251
@@ -61,8 +61,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):
@@ -6152,7 +6152,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))
@@ -6269,7 +6269,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))
More information about the Cluster-devel
mailing list