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

[Cluster-devel] conga ./conga.spec.in.in luci/cluster/resource ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe 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 <rmccabe redhat com> 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 @@
 <body>
 
 <div metal:define-macro="res_form_footer" tal:omit-tag="">
-	<p class="hbSubmit">
-		<input type="button"
-			onClick="validate_form(this.form);"
-			value="Submit"
-			tal:condition="not: sinfo" />
+	<tal:block tal:condition="not:sinfo">
+		<p class="hbSubmit">
+			<input type="button" value="Submit"
+				onClick="validate_form(this.form)" />
+		</p>
+	</tal:block>
+
+	<tal:block tal:condition="sinfo">
+		<table tal:condition="exists:res">
+			<tr>
+				<td>This resource is an independent subtree</td>
+				<td tal:define="isubtree res/attrs/__independent_subtree|nothing">
+					<input class="vanilla" type="checkbox"
+						name="__independent_subtree"
+						tal:attributes="checked python:(isubtree in ['1', 'true', 'True', True, 1]) and 'checked' or None" />
+				</td>
+			</tr>
+		</table>
 
-		<tal:block tal:condition="sinfo">
+		<p class="hbSubmit">
 			<input type="button" value="Add a child"
 				onClick="add_child_resource(this.form)" />
 			<input type="button" value="Delete this resource"
 				onClick="delete_resource(this.form)" />
-		</tal:block>
-	</p>
+		</p>
+	</tal:block>
 
 	<tal:block tal:condition="not:exists:res"
 		tal:define="global expclass string: invisible expander" />
--- 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)


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