CVSROOT:        /cvs/cluster
Module name:    conga
Branch:         RHEL4
Changes by:     [EMAIL PROTECTED]       2008-05-12 18:04:12

Modified files:
        luci/cluster   : resource-form-macros 
        luci/site/luci/Extensions: ResourceHandler.py 

Log message:
        Allow users to choose GFS or GFS2 fstype for clusterfs resources

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.31.2.11&r2=1.31.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ResourceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.2.5&r2=1.2.2.6

--- conga/luci/cluster/resource-form-macros     2008/04/28 03:57:41     
1.31.2.11
+++ conga/luci/cluster/resource-form-macros     2008/05/12 18:04:12     
1.31.2.12
@@ -631,6 +631,19 @@
                </tr>
 
                <tr class="systemsTable">
+                       <td class="systemsTable">Filesystem type</td>
+                       <td class="systemsTable"
+                               tal:define="cur_fstype res/attrs/fstype | 
string:gfs">
+
+                               <input type="radio" name="fstype" value="gfs"
+                                       tal:attributes="checked 
python:cur_fstype.lower() == 'gfs' and 'checked' or ''" />GFS
+                               <br/>
+                               <input type="radio" name="fstype" value="gfs2"
+                                       tal:attributes="checked 
python:cur_fstype.lower() == 'gfs2' and 'checked' or ''" />GFS2
+                       </td>
+               </tr>
+
+               <tr class="systemsTable">
                        <td class="systemsTable">Options</td>
                        <td class="systemsTable">
                                <input type="text" size="20" name="options"
--- conga/luci/site/luci/Extensions/ResourceHandler.py  2008/04/29 16:09:26     
1.2.2.5
+++ conga/luci/site/luci/Extensions/ResourceHandler.py  2008/05/12 18:04:12     
1.2.2.6
@@ -191,6 +191,19 @@
                        luci_log.debug_verbose('addGfs6: %s' % err)
 
        try:
+               fstype = form['fstype'].lower().strip()
+               if not fstype:
+                       raise KeyError, 'No filesystem type was given'
+               if fstype != 'gfs' and fstype != 'gfs2':
+                       raise KeyError, 'An invalid file system type of "%s" 
was given' % fstype
+               res.addAttribute('fstype', fstype)
+       except Exception, e:
+               err = str(e)
+               errors.append(err)
+               if LUCI_DEBUG_MODE is True:
+                       luci_log.debug_verbose('addGfs7a: %s' % err)
+
+       try:
                options = form['options'].strip()
                if not options:
                        raise KeyError, 'no options'

Reply via email to