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: include by zhenh from
([email protected])
2. Linux-HA CVS: mgmt by zhenh from
([email protected])
3. Linux-HA CVS: debian by zhenh from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Tue, 9 May 2006 00:00:07 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include/mgmt
Modified Files:
mgmt_common.h
Log Message:
add the function to set target_role
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/mgmt/mgmt_common.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- mgmt_common.h 4 Apr 2006 06:12:06 -0000 1.5
+++ mgmt_common.h 9 May 2006 06:00:07 -0000 1.6
@@ -426,6 +426,18 @@
/*
description:
+ set the target_role of resource
+format:
+ MSG_SET_TARGET_ROLE resource "started"|"stopped"|"default"
+return:
+ MSG_OK
+or
+ MSG_FAIL
+*/
+#define MSG_SET_TARGET_ROLE "set_target_role"
+
+/*
+description:
return the operations of a given resource
format:
MSG_RSC_OPS resource
------------------------------
Message: 2
Date: Tue, 9 May 2006 00:03:08 -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:
Makefile.am haclient.py.in
Added Files:
default-resource.png
Log Message:
change the way of setting target_role
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- Makefile.am 11 Apr 2006 02:53:33 -0000 1.12
+++ Makefile.am 9 May 2006 06:03:07 -0000 1.13
@@ -24,7 +24,8 @@
halib_SCRIPTS = haclient.py mgmtcmd.py
halib_DATA = haclient.glade ha.png login.png logout.png exit.png \
standby-node.png active-node.png add-resource.png
remove-resource.png \
- start-resource.png stop-resource.png
master-resource.png slave-resource.png
+ start-resource.png stop-resource.png
master-resource.png slave-resource.png \
+ default-resource.png
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/linux-ha -I$(top_srcdir)/linux-ha \
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- haclient.py.in 11 Apr 2006 08:28:37 -0000 1.27
+++ haclient.py.in 9 May 2006 06:03:07 -0000 1.28
@@ -1162,6 +1162,9 @@
and string.find(self.cur_status, _("not running")) == -1
and string.find(self.cur_status, _("running")) != -1)
+ self.set_action_sensitive('defaultrsc',
+ manager.connected
+ and self.cur_type in [_("native")])
# functions
def update(self) :
self.tree.update()
@@ -1295,22 +1298,21 @@
if manager.failed_reason != "" :
msgbox(manager.failed_reason)
- def on_start_item(self, action) :
- (attrs, running_on, params, ops) = \
- manager.get_rsc_info(self.cur_name)
- for param in params :
- if param["name"] == "target_role" and param["value"] ==
"Stopped" :
- manager.do_cmd("del_rsc_param\n"+param["id"])
- return
-
- def on_stop_item(self, action) :
+ def on_item_action(self, action) :
+ if action.get_name() == "startrsc" :
+ target_role = "started"
+ elif action.get_name() == "stoprsc" :
+ target_role = "stopped"
+ else :
+ target_role = "default"
+
(attrs, running_on, params, ops) = \
manager.get_rsc_info(self.cur_name)
for param in params :
- if param["name"] == "target_role" and param["value"] ==
"Stopped" :
+ if param["name"] == "target_role" and param["value"] ==
target_role :
return
-
manager.do_cmd("up_rsc_params\n%s\n%s_target_role\n%s\n%s"%(self.cur_name,self.cur_name,"target_role","Stopped"))
-
+
manager.do_cmd("set_target_role\n%s\n%s"%(self.cur_name,target_role))
+
# constructor
def __init__(self) :
# create window
@@ -1331,6 +1333,7 @@
icons.add("ha-remove-resource",gtk.IconSet(gtk.gdk.pixbuf_new_from_file("@libdir@/heartbeat/remove-resource.png")))
icons.add("ha-start-resource",gtk.IconSet(gtk.gdk.pixbuf_new_from_file("@libdir@/heartbeat/start-resource.png")))
icons.add("ha-stop-resource",gtk.IconSet(gtk.gdk.pixbuf_new_from_file("@libdir@/heartbeat/stop-resource.png")))
+
icons.add("ha-default-resource",gtk.IconSet(gtk.gdk.pixbuf_new_from_file("@libdir@/heartbeat/default-resource.png")))
icons.add("ha-master-resource",gtk.IconSet(gtk.gdk.pixbuf_new_from_file("@libdir@/heartbeat/master-resource.png")))
icons.add("ha-slave-resource",gtk.IconSet(gtk.gdk.pixbuf_new_from_file("@libdir@/heartbeat/slave-resource.png")))
icons.add_default()
@@ -1349,6 +1352,7 @@
<menuitem action="delrsc"/>
<menuitem action="startrsc"/>
<menuitem action="stoprsc"/>
+ <menuitem action="defaultrsc"/>
</menu>
<menu action="node">
<menuitem action="standby"/>
@@ -1363,6 +1367,7 @@
<toolitem action="delrsc"/>
<toolitem action="startrsc"/>
<toolitem action="stoprsc"/>
+ <toolitem action="defaultrsc"/>
<separator/>
<toolitem action="standby"/>
<toolitem action="active"/>
@@ -1380,8 +1385,9 @@
('resource', None, _('Resources')),
('addrsc', "ha-add-resource", _('Add New Item'),
None,_('add new item'), self.on_add_item),
('delrsc', "ha-remove-resource", _('Delete'),
None,_('delete current item'), self.on_del_item),
- ('startrsc', "ha-start-resource", _('Start'),
None,_('start resource'), self.on_start_item),
- ('stoprsc', "ha-stop-resource", _('Stop'), None,_('stop
resource'), self.on_stop_item),
+ ('startrsc', "ha-start-resource", _('Start'),
None,_('start resource'), self.on_item_action),
+ ('stoprsc', "ha-stop-resource", _('Stop'), None,_('stop
resource'), self.on_item_action),
+ ('defaultrsc', "ha-default-resource", _('Default'),
None,_('default'), self.on_item_action),
('node', None, _('Nodes')),
('standby', "ha-standby-node", _('Standby'),
None,_('make the node standby'), self.on_standby),
('active', "ha-active-node", _('Active'), None,_('make
the node active'), self.on_active)
------------------------------
Message: 3
Date: Tue, 9 May 2006 00:03:08 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: debian by zhenh from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : zhenh
Host :
Project : linux-ha
Module : debian
Dir : linux-ha/debian
Modified Files:
heartbeat-2.files
Log Message:
change the way of setting target_role
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/debian/heartbeat-2.files,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- heartbeat-2.files 9 May 2006 04:33:46 -0000 1.13
+++ heartbeat-2.files 9 May 2006 06:03:07 -0000 1.14
@@ -68,6 +68,7 @@
usr/lib/heartbeat/cts/OCFIPraTest.py
usr/lib/heartbeat/cts/OCFMSDummy
usr/lib/heartbeat/cts/extracttests.py
+usr/lib/heartbeat/default-resource.png
usr/lib/heartbeat/exit.png
usr/lib/heartbeat/findif
usr/lib/heartbeat/ha.png
------------------------------
_______________________________________________
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 20
********************************************