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: Thu, 27 Apr 2006 00:56:05 -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:
        mof_map.h mof_map.c 


Log Message:
new class
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/mof_map.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- mof_map.h   13 Apr 2006 08:28:12 -0000      1.3
+++ mof_map.h   27 Apr 2006 06:56:04 -0000      1.4
@@ -49,7 +49,7 @@
 #define HA_LOCATION_CONSTRAINT         9
 #define HA_RESOURCE_GROUP              10
 #define HA_INSTANCE_ATTRIBUTES         11
-
+#define HA_LOCATION_CONSTRAINT_RULE    12
 
 #define METHOD_ADD_RESOURCE            "AddResource"
 #define METHOD_ADD_PRIMITIVE_RESOURCE  "AddPrimitiveResource"
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/mof_map.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- mof_map.c   13 Apr 2006 08:25:49 -0000      1.2
+++ mof_map.c   27 Apr 2006 06:56:04 -0000      1.3
@@ -145,6 +145,13 @@
        {"value",       "Value",        CMPI_chars}
 };
 
+static const map_entry_t HA_LOCATION_CONSTRAINT_RULE_entry [] = {
+       {"id",          "Id",           CMPI_chars},
+       {"attribute",   "Attribute",    CMPI_chars},
+       {"operation",   "Operation",    CMPI_chars},
+       {"value",       "Value",        CMPI_chars},
+};
+
 #define MAKE_ENTRY(id,entry) {id, MAPDIM(entry), entry}
 static const struct map_t map_table [] =
 {
@@ -159,6 +166,7 @@
        MAKE_ENTRY(HA_COLOCATION_CONSTRAINT, HA_COLOCATION_CONSTRAINT_entry),
        MAKE_ENTRY(HA_LOCATION_CONSTRAINT, HA_LOCATION_CONSTRAINT_entry),
        MAKE_ENTRY(HA_INSTANCE_ATTRIBUTES, HA_INSTANCE_ATTRIBUTES_entry),
+       MAKE_ENTRY(HA_LOCATION_CONSTRAINT_RULE, 
HA_LOCATION_CONSTRAINT_RULE_entry),
 };
 
 




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

Message: 2
Date: Thu, 27 Apr 2006 00:56:29 -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:
        resource_common.c 


Log Message:
removed unsed codes
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/resource_common.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- resource_common.c   25 Apr 2006 17:50:31 -0000      1.7
+++ resource_common.c   27 Apr 2006 06:56:29 -0000      1.8
@@ -60,116 +60,6 @@
 static CMPIObjectPath * make_objectpath_byid(CMPIBroker * broker, 
                                        CMPIObjectPath * ref, char * rscid, 
                                        uint32_t type, CMPIStatus * rc);
-#if 0
-static void     
-attributes2inst(CMPIBroker * broker, CMPIInstance * ci,
-       const char * rscid, struct ha_msg *resource, CMPIStatus * rc)
-{
-       struct ha_msg *attributes = NULL;
-       CMPIArray * array = NULL;
-        int len = 0, i = 0;
-       
-       if ((attributes = cim_get_rscattrs(rscid)) == NULL ) {
-               return;
-       }
-
-        len = cim_msg_children_count(attributes);
-       cim_debug2(LOG_INFO, "attirbutes len: %d", len);
-
-        if ( ( array = CMNewArray(broker, len, CMPI_chars, rc)) == NULL ) {
-                cl_log(LOG_ERR, "Resource attribute: can't make CMPIArray.");
-               ha_msg_del(attributes);
-                return;
-        }
-
-        for ( i = 0; i < len; i++ ) {
-                char buf[MAXLEN];
-                const char *id, *name, *value, *p;
-               struct ha_msg *attribute;
-               
-                attribute = cim_msg_child_index(attributes, i);
-                if ( attribute == NULL ) {
-                        continue;
-                }
-
-                id    = cl_get_string(attribute, "id");
-                name  = cl_get_string(attribute, "name");
-                value = cl_get_string(attribute, "value");
-                snprintf(buf, MAXLEN, "%s,%s=%s", id, name, value);
-
-                if ( (p = cim_strdup(buf)) ){
-                        CMSetArrayElementAt(array, i, &p, CMPI_chars);
-                }
-        }
-       CMSetProperty(ci, "InstanceAttributes", &array, CMPI_charsA);
-
-}
-
-static struct ha_msg*
-inst2attributes(CMPIObjectPath* cop, CMPIInstance* ci, CMPIStatus* rc)
-{
-        char *id, *rscid, *rsc_crname;
-        CMPIArray * array;
-        int i, len;
-        struct ha_msg *attributes;
-
-        DEBUG_ENTER();
-        id        = CMGetKeyString(cop, "Id", rc);
-        rscid     = CMGetKeyString(cop, "SystemName", rc);
-        rsc_crname = CMGetKeyString(cop, "SystemCreationClassName", rc);
-
-       cim_debug2(LOG_INFO, "%s: id, rscid, crname = %s, %s, %s", 
-                       __FUNCTION__, id, rscid, rsc_crname);
-        array = CMGetProperty(ci, "InstanceAttributes", rc).value.array;
-        if ( array == NULL ) {
-               cl_log(LOG_ERR, "get_attributes: attributes missing.");
-               return NULL;
-        }
-        len = CMGetArrayCount(array, rc);
-        if ( rc->rc != CMPI_RC_OK) {
-                cl_log(LOG_ERR, "get_attributes: can't get array length.");
-                return NULL;
-        }
-
-        if ((attributes = ha_msg_new(16)) == NULL ) {
-               cl_log(LOG_ERR, "get_attributes: failed to alloc array.");
-                return NULL;
-        }
-
-        for(i = 0; i < len; i++) {
-                CMPIData data;
-               struct ha_msg *attribute;
-                char **s, *v;
-                int len;
-
-                data = CMGetArrayElementAt(array, i, rc);
-                if ( rc->rc != CMPI_RC_OK ) {
-                        continue;
-                }
-                v = CMGetCharPtr(data.value.string);
-
-                if((attribute = ha_msg_new(3)) == NULL ) {
-                        continue;
-                }
-               
-               /* parse attributes, get key and value */
-                s = split_string(v, &len, " ,=");
-                if ( len == 3 ) {
-                       ha_msg_add(attribute, "id", s[0]);
-                        ha_msg_add(attribute, "name", s[1]);
-                        ha_msg_add(attribute, "value", s[2]);
-                }
-
-               cim_msg_add_child(attributes, s[0], attribute);
-                free_2d_array(s, len, cim_free);
-        }
-
-        DEBUG_LEAVE();
-       return attributes;
-}
-
-#endif
-
 static void
 primitive_set_instance(CMPIBroker * broker, CMPIInstance * ci, 
                struct ha_msg *info, CMPIStatus * rc)




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

Message: 3
Date: Thu, 27 Apr 2006 00:58:06 -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:
        ResourceTest.sh 


Log Message:
constraint created in a new way
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/tests/ResourceTest.sh,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ResourceTest.sh     26 Apr 2006 08:10:38 -0000      1.7
+++ ResourceTest.sh     27 Apr 2006 06:58:06 -0000      1.8
@@ -146,8 +146,14 @@
 SystemName="LinuxHACluster",\
 SystemCreationClassName="HA_LinuxHA",\
 Resource="$RSC_ID",\
-Rule="node #eq $NODE",\
 Score=$SCORE
+wbemcli ci http://$USER:[EMAIL 
PROTECTED]/root/cimv2:HA_LocationConstraintRule.Id="${CONS_ID}_rule",\
+ConstraintId="$CONS_ID" \
+Id="${CONS_ID}_rule",\
+ConstraintId="$CONS_ID",\
+Attribute="node",\
+Operation="eq",\
+Value="$NODE"
 } 
 
 function delete_constraint()
@@ -161,6 +167,8 @@
 SystemName="LinuxHACluster",\
 SystemCreationClassName="HA_LinuxHA"
 }
+
+
 ##############################################################
 # primitive resource
 ##############################################################




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

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

Reply via email to