[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: 	RHEL5
Changes by:	rmccabe sourceware org	2007-01-17 22:26:28

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

Log message:
	fix related to bz212021 found during QE testing

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/15 18:21:50	1.120.2.19
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2007/01/17 22:26:27	1.120.2.20
@@ -1600,7 +1600,13 @@
 
 		if 'existing_device' in fence_form:
 			del fence_form['existing_device']
-			fencedev_name = fence_form['name']
+
+			try:
+				fencedev_name = fence_form['name']
+				if not fencedev_name.strip():
+					raise Exception, 'no fence name'
+			except Exception, e:
+				return (False, {'errors': [ 'You must provide a unique name for all fence devices.' ]})
 
 			if fence_type is None:
 				# An unknown device. Pull the data out of
@@ -1654,7 +1660,13 @@
 					instance_list.append({'name': fencedev_name })
 		else:
 			# The user created a new fence device.
-			fencedev_name = fence_form['name']
+			try:
+				fencedev_name = fence_form['name']
+				if not fencedev_name.strip():
+					raise Exception, 'no fence name'
+			except Exception, e:
+				return (False, {'errors': [ 'You must provide a unique name for all fence devices.' ]})
+
 			fencedev_obj = FenceDevice()
 			for k in fence_form.keys():
 				if fence_form[k]:


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