From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 6 Dec 2006 22:44:18 -0000 Subject: [Cluster-devel] conga/luci cluster/form-macros cluster/resourc ... Message-ID: <20061206224418.10834.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at sourceware.org 2006-12-06 22:44:18 Modified files: luci/cluster : form-macros resource_form_handlers.js luci/site/luci/Extensions: cluster_adapters.py Log message: more svc autostart fixes Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.124&r2=1.125 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&r1=1.24&r2=1.25 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.175&r2=1.176 --- conga/luci/cluster/form-macros 2006/12/06 22:11:20 1.124 +++ conga/luci/cluster/form-macros 2006/12/06 22:44:18 1.125 @@ -2918,7 +2918,7 @@ - + @@ -3135,7 +3135,8 @@ Automatically start this service - + @@ -3157,7 +3158,7 @@ - + --- conga/luci/cluster/resource_form_handlers.js 2006/12/05 23:32:34 1.24 +++ conga/luci/cluster/resource_form_handlers.js 2006/12/06 22:44:18 1.25 @@ -444,7 +444,7 @@ /* sort this out in the backend */ master_form.form_xml.value = '' + form_xml + ''; master_form.svc_name.value = svc_name; - master_form.autostart = autostart; + master_form.autostart.value = autostart; var confirm_msg = null; if (master_form.action.value == 'add') --- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/12/06 22:11:20 1.175 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/12/06 22:44:18 1.176 @@ -500,18 +500,19 @@ autostart = "1" try: - if request.form['autostart'] == "0": + if not request.form.has_key('autostart') or request.form['autostart'] == "0": autostart = "0" - except: - pass + except Exception, e: + autostart = None + luci_log.debug_verbose('vSA5a: error getting autostart: %s' % str(e)) try: cur_service = model.retrieveServiceByName(service_name) except GeneralError, e: - luci_log.debug_verbose('vSA5a: no service named %s found' % service_name) + luci_log.debug_verbose('vSA5b: no service named %s found' % service_name) cur_service = None except Exception, e: - luci_log.debug_verbose('vSA5a: no service named %s found: %s' % (service_name, str(e))) + luci_log.debug_verbose('vSA5c: no service named %s found: %s' % (service_name, str(e))) cur_service = None try: @@ -543,7 +544,8 @@ new_service = Service() new_service.addAttribute('name', service_name) - new_service.attr_hash['autostart'] = autostart + if autostart is not None: + new_service.attr_hash['autostart'] = autostart buildSvcTree(new_service, form_hash['toplevel']['kids']) model.resourcemanager_ptr.addChild(new_service)