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

[Cluster-devel] conga/luci/site/luci/Extensions FenceHandler.p ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons sourceware org	2006-12-20 22:06:51

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

Log message:
	minor nits

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.189&r2=1.190

--- conga/luci/site/luci/Extensions/FenceHandler.py	2006/12/20 20:24:27	1.9
+++ conga/luci/site/luci/Extensions/FenceHandler.py	2006/12/20 22:06:49	1.10
@@ -2,7 +2,7 @@
 from ValidationError import ValidationError
 import MessageLibrary
 import ModelBuilder
-from FenceDevice import FenceDevice
+#from FenceDevice import FenceDevice
 from conga_constants import *
 
 INSTALLDIR="/usr/share/system-config-cluster"
@@ -1034,6 +1034,7 @@
       raise ValidationError('FATAL', ILLEGAL_CHARS_REPLACED)
 
 def validateNewFenceDevice(form, model): 
+  from FenceDevice import FenceDevice
   try:
     agent_type = form['fence_type']
   except KeyError, e:
@@ -1292,6 +1293,7 @@
     return (FD_VAL_FAIL, FD_NEW_FAIL % agent_type)
   
 def validateFenceDevice(form, model): 
+  from FenceDevice import FenceDevice
   namechange = False
   try:
     agent_type = form['fence_type']
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/12/20 20:40:31	1.189
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/12/20 22:06:49	1.190
@@ -1186,6 +1186,7 @@
         except:
           pass
 
+    response.redirect(request['URL'] + "?pagetype=" + FENCEDEV + "&clustername=" + clustername + "&fencename=" + form['name'] + '&busyfirst=true')
     return (True, {'errors': errors, 'messages': messages})
   else:
     errors.append(error_string)
@@ -1195,6 +1196,7 @@
 def validateFenceEdit(self, request):
   errors = list()
   messages = list()
+  rc = None
                                                                                 
   try:
     model = request.SESSION.get('model')
@@ -1271,7 +1273,7 @@
     if rc:
       batch_id, result = setClusterConf(rc, str(conf_str))
       if batch_id is None or result is None:
-        luci_log.debug_verbose('VFA: setCluserConf: batchid or result is None')
+        luci_log.debug_verbose('VFA: setClusterConf: batchid or result is None')
         errors.append('Unable to propagate the new cluster configuration for %s' \
         % clustername)
       else:
@@ -1281,6 +1283,7 @@
         except:
           pass
 
+    response.redirect(request['URL'] + "?pagetype=" + FENCEDEV + "&clustername=" + clustername + "&fencename=" + request['fencename'] + '&busyfirst=true')
     return (True, {'errors': errors, 'messages': messages})
   else:
     errors.append(error_string)
@@ -1290,6 +1293,7 @@
 def deleteFenceDevice(self, request):
   errors = list()
   messages = list()
+  rc = None
                                                                                 
   try:
     model = request.SESSION.get('model')
@@ -1336,7 +1340,7 @@
   except KeyError, e:
     return (False, {'errors':['No device name in form submission']})
 
-  fdev_to_delete = None:
+  fdev_to_delete = None
   #iterate thru list of current fencedevs and find one to be deleted
   fdevs = model.getFenceDevices()
   for fdev in fdevs:
@@ -1345,7 +1349,7 @@
       break
   if fdev_to_delete == None:
     luci_log.debug_verbose('VFD: Could not find fence device name in model')
-    return (False, {'errors':['Could not find fence device name in model'])
+    return (False, {'errors':['Could not find fence device name in model']})
 
   #get fencedev ptr
   fdev_ptr = model.getFenceDevicePtr()
@@ -1361,7 +1365,7 @@
   try:
     model.removeFenceInstancesForFenceDevice(orig_name)
   except:
-    luci_log.debug_verbose('VFD: Could not remove fence instances for %s' % origname)
+    luci_log.debug_verbose('VFD: Could not remove fence instances for')
      
 
   if error_code == FD_VAL_SUCCESS:
@@ -1406,6 +1410,7 @@
         except:
           pass
 
+    response.redirect(request['URL'] + "?pagetype=" + FENCEDEVS + "&clustername=" + clustername + '&busyfirst=true')
     return (True, {'errors': errors, 'messages': messages})
   else:
     errors.append(error_string)


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