Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: resources by lars from
([email protected])
2. Linux-HA CVS: mgmt by zhenh from
([email protected])
3. Linux-HA CVS: mgmt by zhenh from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 28 May 2006 14:27:23 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by lars from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : lars
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/OCF
Modified Files:
Filesystem.in
Log Message:
Handle the case where no valid OCFS2 fs is found on the device.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/Filesystem.in,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- Filesystem.in 25 May 2006 17:15:56 -0000 1.24
+++ Filesystem.in 28 May 2006 20:27:22 -0000 1.25
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: Filesystem.in,v 1.24 2006/05/25 17:15:56 lars Exp $
+# $Id: Filesystem.in,v 1.25 2006/05/28 20:27:22 lars Exp $
#
# Support: [EMAIL PROTECTED]
# License: GNU General Public License (GPL)
@@ -95,7 +95,7 @@
usage() {
cat <<-EOT
usage: $0 {start|stop|status|monitor|validate-all|meta-data}
- $Id: Filesystem.in,v 1.24 2006/05/25 17:15:56 lars Exp $
+ $Id: Filesystem.in,v 1.25 2006/05/28 20:27:22 lars Exp $
EOT
}
@@ -596,7 +596,7 @@
fi
OCFS2_UUID=$(mounted.ocfs2 -d $DEVICE|tail -1|awk '{print $3}'|tr -d --
-|tr a-z A-Z)
- if [ -z "$OCFS2_UUID" ]; then
+ if [ -z "$OCFS2_UUID" -o "$OCFS2_UUID" = "UUID" ]; then
ocf_log err "$DEVICE: Could not determine ocfs2 UUID."
exit $OCF_ERR_GENERIC
fi
------------------------------
Message: 2
Date: Sun, 28 May 2006 22:36:51 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/daemon
Modified Files:
mgmt_crm.c
Log Message:
use the real name (without :) to update the resource
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/daemon/mgmt_crm.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- mgmt_crm.c 24 May 2006 09:51:00 -0000 1.42
+++ mgmt_crm.c 29 May 2006 04:36:50 -0000 1.43
@@ -101,7 +101,7 @@
static char* failed_msg(crm_data_t* output, int rc);
static const char* uname2id(const char* node);
static resource_t* get_parent(resource_t* child);
-static int get_fix(const char* rsc_id, char* prefix, char* suffix);
+static int get_fix(const char* rsc_id, char* prefix, char* suffix, char*
real_id);
static const char* get_rsc_tag(resource_t* rsc);
static int cl_msg_swap_offset(struct ha_msg* msg, int offset1, int offset2);
@@ -284,13 +284,12 @@
}
static int
-get_fix(const char* rsc_id, char* prefix, char* suffix)
+get_fix(const char* rsc_id, char* prefix, char* suffix, char* real_id)
{
resource_t* rsc;
resource_t* parent;
pe_working_set_t* data_set;
char* colon;
- char real_id[MAX_STRLEN];
char parent_tag[MAX_STRLEN];
char rsc_tag[MAX_STRLEN];
@@ -300,14 +299,14 @@
return -1;
}
strncpy(rsc_tag, get_rsc_tag(rsc), MAX_STRLEN);
-
+ strncpy(real_id, rsc_id, MAX_STRLEN);
+
parent = get_parent(rsc);
if (parent == NULL) {
snprintf(prefix, MAX_STRLEN,"<%s id=\"%s\">",rsc_tag, rsc_id);
snprintf(suffix, MAX_STRLEN,"</%s>", rsc_tag);
}
else {
- strncpy(real_id, rsc_id, MAX_STRLEN);
colon = strrchr(real_id, ':');
if (colon != NULL) {
*colon = '\0';
@@ -1241,14 +1240,15 @@
char buf[MAX_STRLEN];
char prefix[MAX_STRLEN];
char suffix[MAX_STRLEN];
+ char real_id[MAX_STRLEN];
- if(get_fix(argv[1], prefix, suffix) == -1) {
+ if(get_fix(argv[1], prefix, suffix, real_id) == -1) {
return cl_strdup(MSG_FAIL);
}
snprintf(xml, MAX_STRLEN,
"%s<instance_attributes id=\"ias_%s\"><attributes>",
- prefix ,argv[1]);
+ prefix ,real_id);
for (i = 2; i < argc; i += 3) {
snprintf(buf, MAX_STRLEN,
"<nvpair id=\"%s\" name=\"%s\" value=\"%s\"/>",
@@ -1300,9 +1300,14 @@
char buf[MAX_STRLEN];
char prefix[MAX_STRLEN];
char suffix[MAX_STRLEN];
+ char real_id[MAX_STRLEN];
+
+ if(get_fix(argv[1], prefix, suffix, real_id) == -1) {
+ return cl_strdup(MSG_FAIL);
+ }
if (STRNCMP_CONST(argv[2],"#default") == 0) {
- snprintf(buf, MAX_STRLEN,"%s_target_role", argv[1]);
+ snprintf(buf, MAX_STRLEN,"%s_target_role", real_id);
rc = delete_object("resources", "nvpair", buf, &output);
if (rc < 0) {
return failed_msg(output, rc);
@@ -1310,17 +1315,14 @@
return cl_strdup(MSG_OK);
}
- if(get_fix(argv[1], prefix, suffix) == -1) {
- return cl_strdup(MSG_FAIL);
- }
snprintf(xml, MAX_STRLEN,
"%s<instance_attributes id=\"ias_%s\"><attributes>",
- prefix,argv[1]);
+ prefix,real_id);
snprintf(buf, MAX_STRLEN,
"<nvpair id=\"%s_target_role\" " \
"name=\"target_role\" value=\"%s\"/>",
- argv[1], argv[2]);
+ real_id, argv[2]);
strncat(xml, buf, MAX_STRLEN);
strncat(xml, "</attributes></instance_attributes>", MAX_STRLEN);
@@ -1391,8 +1393,9 @@
char buf[MAX_STRLEN];
char prefix[MAX_STRLEN];
char suffix[MAX_STRLEN];
+ char real_id[MAX_STRLEN];
- if(get_fix(argv[1], prefix, suffix) == -1) {
+ if(get_fix(argv[1], prefix, suffix,real_id) == -1) {
return cl_strdup(MSG_FAIL);
}
------------------------------
Message: 3
Date: Sun, 28 May 2006 22:38:19 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : mgmt
Dir : linux-ha/mgmt/client
Modified Files:
haclient.glade haclient.py.in
Log Message:
make the clone and master work as group.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.glade,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- haclient.glade 16 May 2006 14:46:17 -0000 1.12
+++ haclient.glade 29 May 2006 04:38:19 -0000 1.13
@@ -784,9 +784,7 @@
<child>
<widget class="GtkComboBoxEntry"
id="default_resource_failure_stickiness">
<property name="visible">True</property>
- <property name="items" translatable="yes">INFINITY
-0
--INFINITY</property>
+ <property name="items" translatable="yes">INFINITY</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -3815,7 +3813,7 @@
</child>
</widget>
-<widget class="GtkWindow" id="clone">
+<widget class="GtkWindow" id="compound">
<property name="visible">True</property>
<property name="title" translatable="yes"></property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
@@ -3830,629 +3828,113 @@
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
- <widget class="GtkVBox" id="cloneview">
+ <widget class="GtkVBox" id="compoundrscview">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
- <widget class="GtkTable" id="table10">
+ <widget class="GtkFrame" id="frame17">
<property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">10</property>
- <property name="column_spacing">10</property>
-
- <child>
- <widget class="GtkEventBox" id="eventbox31">
- <property name="visible">True</property>
- <property name="visible_window">True</property>
- <property name="above_child">False</property>
-
- <child>
- <widget class="GtkLabel" id="label164">
- <property name="visible">True</property>
- <property name="label" translatable="yes">ID:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<child>
- <widget class="GtkEventBox" id="eventbox32">
+ <widget class="GtkAlignment" id="alignment16">
<property name="visible">True</property>
- <property name="visible_window">True</property>
- <property name="above_child">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
<child>
- <widget class="GtkLabel" id="label165">
+ <widget class="GtkTable" id="table12">
<property name="visible">True</property>
- <property name="label"
translatable="yes">clone_node_max:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="id">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label168">
- <property name="visible">True</property>
- <property name="label" translatable="yes">clone_max:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="clone_max">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <property name="n_rows">1</property>
+ <property name="n_columns">4</property>
+ <property name="homogeneous">True</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">10</property>
- <child>
- <widget class="GtkEntry" id="clone_node_max">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">10</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label185">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">ID:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">10</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox16">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
+ <child>
+ <widget class="GtkLabel" id="id">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkButton" id="apply">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Apply</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="reset">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Reset</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="master">
- <property name="visible">True</property>
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-
- <child>
- <widget class="GtkVBox" id="masterview">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkTable" id="table11">
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">10</property>
- <property name="column_spacing">10</property>
-
- <child>
- <widget class="GtkEventBox" id="eventbox33">
- <property name="visible">True</property>
- <property name="visible_window">True</property>
- <property name="above_child">False</property>
-
- <child>
- <widget class="GtkLabel" id="label169">
- <property name="visible">True</property>
- <property name="label" translatable="yes">ID:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="eventbox34">
- <property name="visible">True</property>
- <property name="visible_window">True</property>
- <property name="above_child">False</property>
-
- <child>
- <widget class="GtkLabel" id="label170">
- <property name="visible">True</property>
- <property name="label"
translatable="yes">clone_node_max:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="id">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options">expand</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label172">
- <property name="visible">True</property>
- <property name="label" translatable="yes">clone_max:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="clone_max">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="clone_node_max">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label173">
- <property name="visible">True</property>
- <property name="label" translatable="yes">master_max:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label174">
- <property name="visible">True</property>
- <property name="label"
translatable="yes">master_node_max:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_padding">10</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="master_max">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="master_node_max">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_padding">10</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">10</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox17">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="apply">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Apply</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="reset">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Reset</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="group">
- <property name="visible">True</property>
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-
- <child>
- <widget class="GtkVBox" id="grpview">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkFrame" id="frame17">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table12">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">True</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">10</property>
-
- <child>
- <widget class="GtkLabel" id="label185">
- <property name="visible">True</property>
- <property name="label" translatable="yes">ID:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label205">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Type:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
<child>
- <widget class="GtkLabel" id="id">
+ <widget class="GtkLabel" id="type">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
@@ -4466,8 +3948,8 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- haclient.py.in 26 May 2006 03:22:42 -0000 1.47
+++ haclient.py.in 29 May 2006 04:38:19 -0000 1.48
@@ -802,67 +802,6 @@
self.on_changed)
self.update()
-class CloneView(View) :
- name = "cloneview"
- save_clone = None
- def on_apply(self, widget):
- glade = self.glade
- clone = self.save_clone
- clone["clone_max"] = glade.get_widget("clone_max").get_text()
- clone["clone_node_max"] =
glade.get_widget("clone_node_max").get_text()
- manager.update_clone(clone)
- View.on_apply(self, widget)
-
- def update(self) :
- glade = self.glade
- clone = manager.get_clone(self.param)
- if clone != None :
- glade.get_widget("id").set_text(clone["id"])
-
glade.get_widget("clone_max").set_text(clone["clone_max"])
-
glade.get_widget("clone_node_max").set_text(clone["clone_node_max"])
- self.save_clone = clone
- View.update(self)
-
- def __init__(self, clone_id) :
- View.__init__(self,clone_id)
- glade = self.glade
- glade.get_widget("clone_max").connect("changed",
self.on_changed)
- glade.get_widget("clone_node_max").connect("changed",
self.on_changed)
- self.update()
-
-class MasterView(View) :
- name = "masterview"
- save_master = None
- def on_apply(self, widget):
- glade = self.glade
- master = self.save_master
- master["clone_max"] = glade.get_widget("clone_max").get_text()
- master["clone_node_max"] =
glade.get_widget("clone_node_max").get_text()
- master["master_max"] = glade.get_widget("master_max").get_text()
- master["master_node_max"] =
glade.get_widget("master_node_max").get_text()
- manager.update_master(master)
- View.on_apply(self, widget)
-
- def update(self) :
- glade = self.glade
- master = manager.get_master(self.param)
- if master != None :
- glade.get_widget("id").set_text(master["id"])
-
glade.get_widget("clone_max").set_text(master["clone_max"])
-
glade.get_widget("clone_node_max").set_text(master["clone_node_max"])
-
glade.get_widget("master_max").set_text(master["master_max"])
-
glade.get_widget("master_node_max").set_text(master["master_node_max"])
- self.save_master = master
- View.update(self)
-
- def __init__(self, master_id) :
- View.__init__(self,master_id)
- glade = self.glade
- glade.get_widget("clone_max").connect("changed",
self.on_changed)
- glade.get_widget("clone_node_max").connect("changed",
self.on_changed)
- glade.get_widget("master_max").connect("changed",
self.on_changed)
- glade.get_widget("master_node_max").connect("changed",
self.on_changed)
- self.update()
class RscView(View) :
name = "rscview"
@@ -1152,24 +1091,26 @@
return None
-class GrpView(View) :
- name = "grpview"
+class CompoundRscView(View) :
+ name = "compoundrscview"
param_list = None
params_save = None
def on_apply(self, widget):
glade = self.glade
View.on_apply(self, widget)
+ (rid,rtype) = self.param
new_params = self.param_list.get_data()
-
manager.update_attrs("up_rsc_params\n"+self.param,"del_rsc_param",
+ manager.update_attrs("up_rsc_params\n"+rid,"del_rsc_param",
self.params_save, new_params,
["id","name","value"]);
def update(self) :
glade = self.glade
- group_id = self.param
- params = manager.get_rsc_params(group_id)
+ (rid,rtype) = self.param
+ params = manager.get_rsc_params(rid)
self.params_save = params
- glade.get_widget("id").set_text(group_id)
+ glade.get_widget("id").set_text(rid)
+ glade.get_widget("type").set_text(rtype)
self.param_list.clear()
if params != [] :
@@ -1218,6 +1159,7 @@
return False
def update_ui(self) :
+ all_rsc_type = [_("native"),_("group"),_("clone"),_("master")]
self.set_action_sensitive('logout',manager.connected)
self.set_action_sensitive('login',not manager.connected)
self.set_action_sensitive('addrsc',manager.connected)
@@ -1241,19 +1183,19 @@
self.set_action_sensitive('cleanuprsc',
manager.connected
- and self.cur_type in [_("native"),_("group")])
+ and self.cur_type in all_rsc_type)
self.set_action_sensitive('startrsc',
manager.connected
- and self.cur_type in [_("native"),_("group")])
+ and self.cur_type in all_rsc_type)
self.set_action_sensitive('stoprsc',
manager.connected
- and self.cur_type in [_("native"),_("group")])
+ and self.cur_type in all_rsc_type)
self.set_action_sensitive('defaultrsc',
manager.connected
- and self.cur_type in [_("native"),_("group")])
+ and self.cur_type in all_rsc_type)
self.set_action_sensitive('uprsc',
manager.connected
@@ -1287,12 +1229,8 @@
self.cur_view = OrderView(name)
elif type == _("colocation") :
self.cur_view = ColocationView(name)
- elif type == _("clone") :
- self.cur_view = CloneView(name)
- elif type == _("master") :
- self.cur_view = MasterView(name)
- elif type == _("group") :
- self.cur_view = GrpView(name)
+ elif type in [ _("clone"), _("group"), _("master")] :
+ self.cur_view = CompoundRscView((name,type))
else :
self.cur_view = View()
self.view_widget.add(self.cur_view.widget)
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 30, Issue 91
********************************************