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 sunjd from 
      ([email protected])
   2. Linux-HA CVS: mgmt by zhenh from 
      ([email protected])
   3. Linux-HA CVS: crm by andrew from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Tue, 16 May 2006 20:04:33 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by sunjd from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : sunjd
Host    : 
Project : linux-ha
Module  : resources

Dir     : linux-ha/resources/OCF


Modified Files:
        apache.in 


Log Message:
fix metadata
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/apache.in,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- apache.in   15 May 2006 10:07:32 -0000      1.20
+++ apache.in   17 May 2006 02:04:32 -0000      1.21
@@ -456,7 +456,7 @@
 Extra options to apply when starting apache. See man httpd(8).
 </longdesc>
 <shortdesc lang="en">command line options</shortdesc>
-<content type="string" ""/>
+<content type="string" />
 </parameter>
 
 </parameters>




------------------------------

Message: 2
Date: Tue, 16 May 2006 21:07:43 -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.py.in 


Log Message:
add right click menu
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- haclient.py.in      16 May 2006 14:46:17 -0000      1.41
+++ haclient.py.in      17 May 2006 03:07:42 -0000      1.42
@@ -323,6 +323,17 @@
 class Tree :
        store = None
        widget = None
+       def on_right_click(self, widget, event) :
+               if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3 :
+                       menu = None
+                       if window.cur_type in ["node"] :
+                               menu = 
window.uimanager.get_widget("/node_popup")
+                       elif window.cur_type in ["cluster"] or window.cur_type 
== None:
+                               menu = 
window.uimanager.get_widget("/connection_popup")
+                       else :
+                               menu = 
window.uimanager.get_widget("/resource_popup")
+                       menu.popup(None, None, None, event.button, event.time)
+
        def __init__(self, widget) :
                self.store = gtk.TreeStore(str, str, str)
                widget.set_model(self.store)
@@ -330,6 +341,7 @@
                add_column(widget, _("Status"), 1)
                widget.set_size_request(300, 100)
                widget.connect("cursor-changed", self.on_cursor_changed, 
widget.get_selection())
+               widget.connect("event-after", self.on_right_click)
                self.widget = widget
        
        def on_cursor_changed(self, treeview, selection) :
@@ -1445,6 +1457,24 @@
                                        <menuitem action="active"/>
                                </menu>
                        </menubar>
+                       <popup name="resource_popup">
+                               <menuitem action="addrsc"/>
+                               <menuitem action="delrsc"/>
+                               <menuitem action="startrsc"/>
+                               <menuitem action="stoprsc"/>
+                               <menuitem action="defaultrsc"/>
+                               <menuitem action="uprsc"/>
+                               <menuitem action="downrsc"/>
+                       </popup>
+                       <popup name="connection_popup">
+                               <menuitem action="login"/>
+                               <menuitem action="logout"/>
+                               <menuitem action="quit"/>
+                       </popup>
+                       <popup action="node_popup">
+                               <menuitem action="standby"/>
+                               <menuitem action="active"/>
+                       </popup>
                        <toolbar name="toolbar">
                                <toolitem action="login"/>
                                <toolitem action="logout"/>




------------------------------

Message: 3
Date: Wed, 17 May 2006 01:59:03 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : crm

Dir     : linux-ha/crm/pengine


Modified Files:
        ptest.c regression.core.sh 


Log Message:
Usability improvements for ptest
 - help text
 - better options for specifying inputs and saving outputs

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/ptest.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- ptest.c     15 May 2006 10:21:04 -0000      1.74
+++ ptest.c     17 May 2006 07:59:02 -0000      1.75
@@ -1,4 +1,4 @@
-/* $Id: ptest.c,v 1.74 2006/05/15 10:21:04 andrew Exp $ */
+/* $Id: ptest.c,v 1.75 2006/05/17 07:59:02 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -36,7 +36,7 @@
 
 #include <crm/cib.h>
 
-#define OPTARGS        "V?X:wD:L"
+#define OPTARGS        "V?X:D:G:I:Lwx"
 
 #ifdef HAVE_GETOPT_H
 #  include <getopt.h>
@@ -45,6 +45,7 @@
 #include <pengine.h>
 #include <pe_utils.h>
 
+gboolean use_stdin = FALSE;
 gboolean inhibit_exit = FALSE;
 extern crm_data_t * do_calculations(
        pe_working_set_t *data_set, crm_data_t *xml_input, ha_time_t *now);
@@ -89,6 +90,23 @@
 /*     dot_write("     ]"); */
 }
 
+static void
+usage(const char *cli, int exitcode)
+{
+       FILE *out = exitcode?stderr:stdout;
+       fprintf(out, "Usage: %s -(?|L|X|x) [-V] [-D] [-G] [-I]\n", cli);
+       fprintf(out, "    --%s (-%c): This text\n\n", "help", '?');
+       fprintf(out, "    --%s (-%c): Increase verbosity (can be supplied 
multiple times)\n\n", "verbose", 'V');
+       fprintf(out, "    --%s (-%c): Connect to the CIB and use the current 
contents as input\n", "live-check", 'L');
+       fprintf(out, "    --%s (-%c): Look for xml on stdin\n", "xml-stream", 
'x');
+       fprintf(out, "    --%s (-%c)\t<filename> : Look for xml in the named 
file\n\n", "xml-file", 'X');
+
+       fprintf(out, "    --%s (-%c)\t<filename> : Save the transition graph to 
the named file\n", "save-graph",   'G');
+       fprintf(out, "    --%s (-%c)\t<filename> : Save the DOT formatted 
transition graph to the named file\n", "save-dotfile", 'D');
+       fprintf(out, "    --%s (-%c)\t<filename> : Save the input to the named 
file\n", "save-input",   'I');
+       exit(exitcode);
+}
+
 static char *
 create_action_name(action_t *action) 
 {
@@ -129,7 +147,8 @@
        
        const char *xml_file = NULL;
        const char *dot_file = NULL;
-
+       const char *graph_file = NULL;
+       const char *input_file = NULL;
        
        cl_log_set_entity("ptest");
        cl_log_set_facility(LOG_USER);
@@ -140,10 +159,17 @@
                int option_index = 0;
                static struct option long_options[] = {
                        /* Top-level Options */
-                       {F_CRM_DATA,  1, 0, 'X'},
+                       {"help",        0, 0, '?'},
+                       {"verbose",     0, 0, 'V'},                     
+
                        {"live-check",  0, 0, 'L'},
-                       {"help", 0, 0, 0},
-      
+                       {"xml-stream",  0, 0, 'x'},
+                       {"xml-file",    1, 0, 'X'},
+
+                       {"save-graph",  1, 0, 'G'},
+                       {"save-dotfile",1, 0, 'D'},
+                       {"save-input",  1, 0, 'I'},
+
                        {0, 0, 0, 0}
                };
 #endif
@@ -171,12 +197,21 @@
                        case 'w':
                                inhibit_exit = TRUE;
                                break;
+                       case 'x':
+                               use_stdin = TRUE;
+                               break;
                        case 'X':
                                xml_file = crm_strdup(optarg);
                                break;
                        case 'D':
                                dot_file = crm_strdup(optarg);
                                break;
+                       case 'G':
+                               graph_file = crm_strdup(optarg);
+                               break;
+                       case 'I':
+                               input_file = crm_strdup(optarg);
+                               break;
                        case 'V':
                                cl_log_enable_stderr(TRUE);
                                alter_debug(DEBUG_INC);
@@ -184,6 +219,9 @@
                        case 'L':
                                USE_LIVE_CIB = TRUE;
                                break;
+                       case '?':
+                               usage("ptest", 0);
+                               break;
                        default:
                                printf("?? getopt returned character code 0%o 
??\n", flag);
                                ++argerr;
@@ -205,6 +243,7 @@
   
        if (argerr) {
                crm_err("%d errors in option parsing", argerr);
+               usage("ptest", 1);
        }
   
        crm_info("=#=#=#=#= Getting XML =#=#=#=#=");    
@@ -232,8 +271,12 @@
        } else if(xml_file != NULL) {
                FILE *xml_strm = fopen(xml_file, "r");
                cib_object = file2xml(xml_strm);
-       } else {
+
+       } else if(use_stdin) {
                cib_object = stdin2xml();
+
+       } else {
+               usage("ptest", 1);
        }
 
 #ifdef MCHECK
@@ -244,6 +287,15 @@
        crm_notice("Required feature set: %s", feature_set(cib_object));
        do_id_check(cib_object, NULL, FALSE, FALSE);
 
+       if(input_file != NULL) {
+               FILE *input_strm = fopen(input_file, "w");
+               msg_buffer = dump_xml_formatted(cib_object);
+               fprintf(input_strm, "%s\n", msg_buffer);
+               fflush(input_strm);
+               fclose(input_strm);
+               crm_free(msg_buffer);
+       }
+       
        crm_zero_mem_stats(NULL);
        
        fake_now = crm_element_value(cib_object, "fake_now");
@@ -261,8 +313,16 @@
        do_calculations(&data_set, cib_object, a_date);
 
        msg_buffer = dump_xml_formatted(data_set.graph);
-       fprintf(stdout, "%s\n", msg_buffer);
-       fflush(stdout);
+       if(graph_file != NULL) {
+               FILE *graph_strm = fopen(graph_file, "w");
+               fprintf(graph_strm, "%s\n", msg_buffer);
+               fflush(graph_strm);
+               fclose(graph_strm);
+               
+       } else {
+               fprintf(stdout, "%s\n", msg_buffer);
+               fflush(stdout);
+       }
        crm_free(msg_buffer);
 
        dot_strm = fopen(dot_file, "w");
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.core.sh,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- regression.core.sh  22 Apr 2006 17:42:39 -0000      1.18
+++ regression.core.sh  17 May 2006 07:59:02 -0000      1.19
@@ -50,7 +50,7 @@
     fi
 
 #    ../admin/crm_verify -X $input
-    ./ptest -V -X $input -D $dot_output > $output
+    ./ptest -V -X $input -D $dot_output -G $output
 
     if [ -s core ]; then
        echo "Test $name        ($base)...      Moved core to core.${base}";




------------------------------

_______________________________________________
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 52
********************************************

Reply via email to