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: cim by panjiam from 
      ([email protected])
   2. Linux-HA CVS: cim by panjiam from 
      ([email protected])
   3. Linux-HA CVS: cim by panjiam from 
      ([email protected])


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

Message: 1
Date: Tue, 25 Apr 2006 11:50:31 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cim

Dir     : linux-ha/cim/tests


Modified Files:
        runtest.sh 


Log Message:
other fixes
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/tests/runtest.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- runtest.sh  13 Apr 2006 08:34:59 -0000      1.9
+++ runtest.sh  25 Apr 2006 17:50:31 -0000      1.10
@@ -48,13 +48,15 @@
              HA_OrderConstraint
              HA_LocationConstraint
              HA_ColocationConstraint
-              HA_InstanceAttributes"
+              HA_InstanceAttributes
+              HA_Operation"
 
 ASSOC_CLASSES="HA_ParticipatingNode
                HA_InstalledSoftwareIdentity
               HA_SubResource
                HA_HostedResource
-               HA_AttributesOfResource"
+               HA_AttributesOfResource
+               HA_OperationOnResource"
 
 ALL_CLASSES="$INST_CLASSES $ASSOC_CLASSES"
 
@@ -67,7 +69,7 @@
                 echo "HA_ParticipatingNode HA_HostedResource";;
         HA_PrimitiveResource) 
                echo "HA_SubResource HA_HostedResource
-                     HA_AttributesOfResource";;
+                     HA_AttributesOfResource HA_OperationOnResource";;
         HA_MasterSlaveResource|HA_ResourceClone|HA_ResourceGroup) 
                 echo "HA_SubResource";;
         HA_SoftwareIdentity) 




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

Message: 2
Date: Tue, 25 Apr 2006 11:50:32 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cim

Dir     : linux-ha/cim


Modified Files:
        clustering_service_provider.c instance_attrs_provider.c 
        operation_provider.c resource_common.c simple_test.c 


Log Message:
other fixes
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/instance_attrs_provider.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- instance_attrs_provider.c   13 Apr 2006 07:29:09 -0000      1.1
+++ instance_attrs_provider.c   25 Apr 2006 17:50:31 -0000      1.2
@@ -47,7 +47,7 @@
 {
        struct ha_msg *instattrss = NULL, *nvpair;
 
-       if ((instattrss = cim_get_rscattrs(rscid)) == NULL ) {
+       if ((instattrss = cim_rscattrs_get(rscid)) == NULL ) {
                return NULL;
        }
        if ((nvpair = cim_msg_find_child(instattrss, nvid))) {
@@ -97,7 +97,7 @@
        namespace = CMGetCharPtr(CMGetNameSpace(ref, rc));
 
        /* all resources, including the sub resources */
-       if ((msg = cim_get_rsc_list())== NULL 
+       if ((msg = cim_get_all_rsc_list())== NULL 
                || (rsclist = cim_traverse_allrsc(msg)) == NULL ) {
                cl_log(LOG_WARNING, "%s: no resource found.", __FUNCTION__);
                goto done;
@@ -113,7 +113,7 @@
                }
 
                /* get the resource's instance attributes */
-               if ((instattrs = cim_get_rscattrs(rscid)) == NULL ){
+               if ((instattrs = cim_rscattrs_get(rscid)) == NULL ){
                        continue;
                }
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/operation_provider.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- operation_provider.c        13 Apr 2006 08:07:48 -0000      1.5
+++ operation_provider.c        25 Apr 2006 17:50:31 -0000      1.6
@@ -97,7 +97,7 @@
                return HA_FAIL;
        }
 
-       if ((msg = cim_get_rsc_list())== NULL 
+       if ((msg = cim_get_all_rsc_list())== NULL 
                || (rsclist = cim_traverse_allrsc(msg)) == NULL ) {
                goto done;
        }
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/resource_common.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- resource_common.c   14 Apr 2006 03:35:02 -0000      1.6
+++ resource_common.c   25 Apr 2006 17:50:31 -0000      1.7
@@ -181,7 +181,7 @@
        cmpi_msg2inst(broker, ci, HA_PRIMITIVE_RESOURCE, info, rc);
        id = cl_get_string(info, "id");
        
-       if ( !cim_is_rsc_disabled(id) ) {
+       if ( RESOURCE_ENABLED(id) ) {
                msg = cim_query_dispatch(GET_RSC_HOST, id, NULL);
        }
         /* get hosting node */
@@ -281,8 +281,7 @@
         CMPIInstance * ci = NULL;
         char * namespace, * classname;
         CMPIObjectPath * op;
-       struct ha_msg *info, *msg;
-       int i, len;
+       struct ha_msg *info = NULL;
 
         namespace = CMGetCharPtr(CMGetNameSpace(ref, rc));
         switch(type) {
@@ -307,24 +306,10 @@
                return NULL;
        }
        
-       if ( (msg = cim_get_disabled_rsc_list()) == NULL ) {
+       if ( RESOURCE_ENABLED(rscid)) {
                ha_msg_add(info, "enabled", "true");
        } else {
-               len = cim_list_length(msg);
-               for(i = 0; i < len; i++) {
-                       char *rsc = NULL;
-                       if ((rsc = cim_list_index(msg, i)) == NULL ) {
-                               continue;
-                       }
-                       if ( strncmp(rsc, rscid, MAXLEN) == 0){
-                               break;
-                       }
-               }
-               if(i==len) {    /* not found */
-                       ha_msg_add(info, "enabled", "true");
-               }else {
-                       ha_msg_add(info, "enabled", "false");
-               }
+               ha_msg_add(info, "enabled", "false");
        }
        
         op = CMNewObjectPath(broker, namespace, classname, rc);
@@ -435,7 +420,7 @@
                return HA_FAIL;
        }
 
-        if ( ( names = cim_get_rsc_list()) == NULL ) {
+        if ( ( names = cim_get_all_rsc_list()) == NULL ) {
                rc->rc = CMPI_RC_ERR_FAILED;
                cl_log(LOG_WARNING, "Get resource list failed.");
                 return HA_FAIL;
@@ -617,18 +602,7 @@
 
        ha_msg_add(resource, "enabled", "false");
 
-       /* add to list */       
-       ret = cim_update_disabled_rsc_list(1, rscid);
-
-       /* write to disk */
-       cim_add_rsctype(rscid, rsctype);
-       cim_store_rsc(type, rscid, resource);
-       /*
-       if ( type == TID_RES_PRIMITIVE) {
-               resource_update_instattrs(rscid, attributes);
-               ha_msg_del(attributes);
-       }
-       */
+       ret = cim_rscdb_store(type, rscid, resource);
        rc->rc = (ret==HA_OK) ? CMPI_RC_OK: CMPI_RC_ERR_FAILED;
        ha_msg_del(resource);
        DEBUG_LEAVE();
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/simple_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- simple_test.c       13 Apr 2006 08:35:16 -0000      1.3
+++ simple_test.c       25 Apr 2006 17:50:31 -0000      1.4
@@ -38,14 +38,7 @@
 #include "cluster_info.h"
 #include "mgmt_client.h"
 
-
 int main(int argc, char * argv[])
 {
-       struct ha_msg *m;
-       //cim_query_dispatch(16, "child_DoFencing:1", NULL);
-       cim_init_logger("test");
-       
-       m = cim_get_rscops("child_DoFencing:1");
-       cim_debug_msg(m, "operations");
         return 0;
 }




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

Message: 3
Date: Tue, 25 Apr 2006 11:52:28 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cim

Dir     : linux-ha/cim


Modified Files:
        mgmt_client.c 


Log Message:
LOG_WARN -> LOG_WARNING
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/mgmt_client.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- mgmt_client.c       25 Apr 2006 17:34:50 -0000      1.4
+++ mgmt_client.c       25 Apr 2006 17:52:27 -0000      1.5
@@ -174,9 +174,9 @@
                        __FUNCTION__, client->cmnd, result);
 
        if ( ! mgmt_result_ok(result) )  {
-                cl_log(LOG_WARN, "mclient_process: client return \'failed\'.");
-               cl_log(LOG_WARN, "mclient_process: cmnd %s", client->cmnd);
-               cl_log(LOG_WARN, "mclient_process: %s", result);
+                cl_log(LOG_WARNING, "mclient_process: client return 
\'failed\'.");
+               cl_log(LOG_WARNING, "mclient_process: cmnd %s", client->cmnd);
+               cl_log(LOG_WARNING, "mclient_process: %s", result);
                rc = MC_FAIL;
                 goto exit1;
         }




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

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 29, Issue 131
*********************************************

Reply via email to