Skip to contentSkip to conversation

conga/luci/site/luci/Extensions ricci_bridge.py

Cluster-devel [email protected] 1 participant 1 message Oct 12, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-10-12 21:57:09

Modified files:
luci/site/luci/Extensions: ricci_bridge.py

Log message:
set cluster_version xml attr

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.24&r2=1.25

luci/site/luci/Extensions/ricci_bridge.py +9 -3
@@ -725,8 +725,14 @@
                        upgrade_rpms):
     batch = '<?xml version="1.0" ?>'
     batch += '<batch>'
-    
-    
+
+    if os_str == 'rhel5':
+        cluster_version = '5'
+    elif os_str == 'rhel4':
+        cluster_version = '4'
+    else:
+        cluster_version = 'unknown'
+
     batch += '<module name="rpm">'
     batch += '<request API_version="1.0">'
     batch += '<function_call name="install">'
@@ -772,7 +778,7 @@
     batch += '<function_call name="set_cluster.conf">'
     batch += '<var mutable="false" name="propagate" type="boolean" value="false"/>'
     batch += '<var mutable="false" name="cluster.conf" type="xml">'
-    batch += '<cluster config_version="1" name="' + cluster_name + '" alias="' + cluster_alias + '">'
+    batch += '<cluster config_version="1" name="' + cluster_name + '" alias="' + cluster_alias + '" cluster_version="' + cluster_version + '">'
     batch += '<fence_daemon post_fail_delay="0" post_join_delay="3"/>'
 
     batch += '<clusternodes>'