From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 6 Nov 2007 23:05:08 -0000 Subject: [Cluster-devel] conga ./conga.spec.in.in luci/cluster/resource ... Message-ID: <20071106230508.23473.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 2007-11-06 23:05:07 Modified files: . : conga.spec.in.in luci/cluster : resource-form-macros luci/site/luci/Extensions: LuciClusterInfo.py cluster_adapters.py luci/site/luci/Extensions/ClusterModel: ModelBuilder.py Log message: fix 264161 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&r1=1.89&r2=1.90 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&r1=1.44&r2=1.45 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.py.diff?cvsroot=cluster&r1=1.16&r2=1.17 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.274&r2=1.275 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py.diff?cvsroot=cluster&r1=1.12&r2=1.13 --- conga/conga.spec.in.in 2007/11/06 19:58:00 1.89 +++ conga/conga.spec.in.in 2007/11/06 23:05:06 1.90 @@ -300,6 +300,7 @@ - Fixed bz320411 (conga should use the node name in cluster.conf and not FQDN for fencing) - Fixed bz253727 (RFE: graphical view should be default in partiton tables view) - Fixed bz337041 (Add option to not fail-back service) +- Fixed bz264161 (RFE: support setting the "__independent_subtree" attribute on cluster resources) * Mon Aug 27 2007 Ryan McCabe 0.10.0-6 - Fixed bz253783 --- conga/luci/cluster/resource-form-macros 2007/10/09 20:24:42 1.44 +++ conga/luci/cluster/resource-form-macros 2007/11/06 23:05:06 1.45 @@ -14,19 +14,32 @@
-

- + +

+ +

+ + + + + + + + +
This resource is an independent subtree + +
- +

- -

+

+
--- conga/luci/site/luci/Extensions/LuciClusterInfo.py 2007/11/06 19:58:00 1.16 +++ conga/luci/site/luci/Extensions/LuciClusterInfo.py 2007/11/06 23:05:07 1.17 @@ -287,10 +287,12 @@ #Note: Final version needs all resource attrs if child.isRefObject() is True: + child_obj = child.getObj() + rc_map['attrs'] = child.getAttributes().copy() + rc_map['attrs'].update(child_obj.getAttributes()) + rc_map['type'] = child_obj.getResourceType() rc_map['ref_object'] = True - rc_map['tag_name'] = child.getObj().TAG_NAME - rc_map['type'] = child.getObj().getResourceType() - rc_map['attrs'] = child.getObj().getAttributes() + rc_map['tag_name'] = child_obj.TAG_NAME else: rc_map['tag_name'] = child.TAG_NAME rc_map['type'] = child.getResourceType() --- conga/luci/site/luci/Extensions/cluster_adapters.py 2007/11/06 19:58:00 1.274 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/11/06 23:05:07 1.275 @@ -809,6 +809,11 @@ if resObj is None: return (False, { 'errors': [ 'An error occurred while adding %s' % res_type ]}) + + if dummy_form.has_key('__independent_subtree'): + resObj.addAttribute('__independent_subtree', '1') + else: + resObj.removeAttribute('__independent_subtree') form_hash[form_id]['obj'] = resObj if len(errors) > 0: --- conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py 2007/10/03 19:40:37 1.12 +++ conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py 2007/11/06 23:05:07 1.13 @@ -413,6 +413,15 @@ if result is False: return result + try: + entity_attr = entity.getAttributes() + if entity_attr is not None: + for i in entity_attr.iterkeys(): + if not rf.attr_hash.has_key(i): + rf.addAttribute(i, entity_attr[i]) + except: + pass + if parent is None: #Must be a service self.resourcemanager_ptr.addChild(rf) self.resourcemanager_ptr.removeChild(entity)