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])
4. Linux-HA CVS: cim by panjiam from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 19 Mar 2006 20:18:30 -0700 (MST)
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
Removed Files:
resource_instance_provider.c inst_attribute_provider.c
Log Message:
'attributes' is a property of resource now
------------------------------
Message: 2
Date: Sun, 19 Mar 2006 20:21:31 -0700 (MST)
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
Added Files:
mof_map.h utils.c utils.h
Log Message:
some utilities
------------------------------
Message: 3
Date: Sun, 19 Mar 2006 20:23:28 -0700 (MST)
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:
cmpi_utils.h
Added Files:
cmpi_utils.c
Log Message:
renamed to cmpi_utils
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/cmpi_utils.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- cmpi_utils.h 21 Dec 2005 10:38:10 -0000 1.5
+++ cmpi_utils.h 20 Mar 2006 03:23:27 -0000 1.6
@@ -4,7 +4,9 @@
#include <cmpidt.h>
#include <cmpift.h>
#include <cmpimacs.h>
-
+#include <glib.h>
+#include "utils.h"
+#include "mof_map.h"
/* for compatibility */
#ifndef CMPIVersion090
@@ -20,13 +22,93 @@
#endif /* CMPIVersion090 */
+#define CMGetKeyString(op,key,rc) ({ \
+ CMPIString * s = CMGetKey(op,key,rc).value.string;\
+ char *v = NULL; \
+ if ( s == NULL ) { \
+ cl_log(LOG_ERR, "key %s is missing.", key);\
+ }else { \
+ v = CMGetCharPtr(s); \
+ } \
+ v; \
+ })
+
+
+int cmpi_set_properties(CMPIBroker * broker, CMPIInstance * inst,
+ CIMTable * t, const mapping_t * map, int count, CMPIStatus *
rc);
+int cmpi_get_properties(CMPIInstance * inst, CIMTable * t,
+ const mapping_t * map, int count, CMPIStatus * rc);
+
+/***********************************************************
+ * assocation functions
+ **********************************************************/
+
+typedef int
+(* assoc_pred_func_t)(CMPIBroker * broker, char * classname, CMPIContext *
ctx,
+ CMPIObjectPath * left, CMPIObjectPath * right, CMPIStatus * rc);
+
+struct assoc_env {
+ GPtrArray * left_op_tbl;
+ GPtrArray * right_op_tbl;
+ int (*done)(struct assoc_env * env);
+};
+
+
+/* target_name: which should be enumerated
+ source_op : generate enumeration according to this object path */
+
+typedef CMPIArray *
+(* assoc_enum_func_t) (CMPIBroker * broker, char * classname, CMPIContext *
ctx,
+ char * namespace, char * target_name, char *
target_role,
+ CMPIObjectPath * source_op, /*void * user_data,*/
+ CMPIStatus * rc);
+
+CMPIArray *
+cmpi_instance_names(CMPIBroker * broker, char * namespace, char * classname,
+ CMPIContext * ctx, CMPIStatus *rc);
+/* get instance */
+int
+assoc_get_inst(CMPIBroker * broker, char * classname, CMPIContext * ctx,
+ CMPIResult * rslt, CMPIObjectPath * cop,
+ char * left, char * right, CMPIStatus * rc);
+
+/* enumerate cop's associators */
+int
+assoc_enum_associators(CMPIBroker * broker, char * classname,
+ CMPIContext * ctx, CMPIResult * rslt, CMPIObjectPath *
cop,
+ char * left, char * right, char * lclass, char * rclass,
+ const char * assoc_class, const char * result_class,
+ const char * role, const char * result_role,
+ assoc_pred_func_t func, assoc_enum_func_t enum_func,
+ int inst, CMPIStatus * rc);
+
+/* enum cop's references */
+int
+assoc_enum_references(CMPIBroker * broker, char * classname,
+ CMPIContext * ctx, CMPIResult * rslt, CMPIObjectPath * cop,
+ char * left, char * right, char * lclass, char * rclass,
+ const char * result_class, const char * role,
+ assoc_pred_func_t func, assoc_enum_func_t enum_func,
+ int inst, CMPIStatus * rc);
+
+/* enum association's instances */
+int
+assoc_enum_insts(CMPIBroker * broker, char * classname,
+ CMPIContext * ctx, CMPIResult * rslt, CMPIObjectPath *
cop,
+ char * left, char * right, char * lclass, char * rclass,
+ assoc_pred_func_t func, assoc_enum_func_t enum_func,
+ int inst, CMPIStatus * rc);
+
+
+
+
/* return ret if obj is a NULL CMPI Object */
-#define RETURN_IFNULL_OBJ(obj, ret, n) do { \
- if ( CMIsNullObject(obj) ) { \
- cl_log(LOG_ERR, "%s: CMPI Object %s is NULL", \
- __FUNCTION__, n); \
- return ret; \
- } \
+#define RETURN_IFNULL_OBJ(obj, ret, n) do { \
+ if ( CMIsNullObject(obj) ) { \
+ cl_log(LOG_ERR, "%s:%s:%d: CMPI Object: %s is NULL",\
+ __FUNCTION__, __FILE__, __LINE__, n);\
+ return ret; \
+ } \
} while (0)
/* return HA_FAIL if obj is a NULL CMPI Object */
@@ -261,5 +343,4 @@
return &mi; \
}
-
#endif /* _CMPI_UTILS_H */
------------------------------
Message: 4
Date: Sun, 19 Mar 2006 20:24:35 -0700 (MST)
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/mof
Modified Files:
LinuxHA.mof LinuxHA.reg
Log Message:
mof changed
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/mof/LinuxHA.mof,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- LinuxHA.mof 21 Dec 2005 10:09:28 -0000 1.7
+++ LinuxHA.mof 20 Mar 2006 03:24:34 -0000 1.8
@@ -39,7 +39,7 @@
"The apiauth directive specifies what users and/or groups"
"are allowed to connect to a specific API group name")
]
- string APIAuth;
+ string APIAuth [];
string NiceFailBack;
[ Description(
@@ -73,7 +73,7 @@
"or the 2.x-style cluster manager that supports more than 2 "
"nodes" )
]
- string WithCrm ;
+ string WithCrm;
[ Description(
"How quickly Heartbeat should decide that a ping node in a "
@@ -142,13 +142,13 @@
[ Description("What machines are in the cluster")]
- string Node;
+ string Node [];
[ Description("Declare PingNodes to Heartbeat")]
- string PingNode;
+ string PingNode [];
[ Description("Declare PingNodes to Heartbeat")]
- string PingGroup;
+ string PingGroup [];
[ Description(
"The realtime directive specifies whether or not Heartbeat "
@@ -204,6 +204,13 @@
string CoreRootDir;
string LogBadPack;
+ /* Authentication config */
+ [ Description("Authentication method"),
+ ValueMap { "0", "1", "2" },
+ Values { "sha1", "md5", "crc" } ]
+ uint32 AuthMethod;
+ string AuthKey;
+
/* CRM config */
string TransitionIdleTimeout;
string SymmetricCluster;
@@ -214,8 +221,7 @@
string HaveQuorum;
/* methods */
- uint32 RequestStatusChange(string action);
-
+ /* RequestStateChange */
};
//----------------------------------------
@@ -270,11 +276,8 @@
[ Override ( "Name" ), Description ("Node's uname") ]
string Name;
- [ Description ("Node's UUID" ) ]
- string UUID;
-
- [ Description ( "Node's active status" ) ]
- string ActiveStatus;
+ string OnLine;
+ string Unclean;
string Status;
string IsDC;
@@ -284,12 +287,6 @@
string Shutdown;
string ExpectedUp;
string NodePing;
-
- /* DTD1.0/Annotated */
- [ Description ( "weight for influencing the DC election process" ) ]
- string DcWeight;
- string Description;
-
};
@@ -319,7 +316,7 @@
//----------------------------------------------
/* in DTD, InstanceAttributes contain Attributes, Rules */
-
+/*
[ Provider("cmpi:HA_InstanceAttributesProvider") ]
class HA_InstanceAttributes {
[ Key ]
@@ -328,7 +325,6 @@
[ Key ]
string CreationClassName;
- /* if resource, this is the resource's id */
[ Key ]
string SystemName;
@@ -337,11 +333,10 @@
string Caption;
- /* make things simple */
- string NVPairs [];
+ string InstAttributes [];
};
-
+*/
//----------------------------------------------
// Association, HA_InstanceAttributesRule
//----------------------------------------------
@@ -388,9 +383,10 @@
string ResourceStickiness = "0"; /* 0|INFINITY|-INFINITY */
string StartPreRep; /* nothing|quorum|fencing */
-
string Caption;
+ [ Description ("Instance attributes, in format: [key]=[value]") ]
+ string InstanceAttributes[];
};
//----------------------------------------
@@ -401,18 +397,11 @@
Provider("cmpi:HA_PrimitiveResourceProvider")
]
class HA_PrimitiveResource : HA_ClusterResource {
- [ Description ( "Cluster rsource's type") ]
string ResourceClass;
-
- [ Description ( "Cluster rsource's type") ]
string Type;
-
- [ Description ( "Cluster rsource's provider") ]
string Provider;
-
- [ Description ( "The cluster node that host this resource" )
- ]
string HostingNode;
+ string GroupId;
};
@@ -424,7 +413,6 @@
class HA_ResourceGroup : HA_ClusterResource {
};
-
//----------------------------------------
// HA_ResrouceClone
//----------------------------------------
@@ -433,6 +421,8 @@
string Notify;
string Ordered;
string Interleave;
+ string CloneMax;
+ string CloneNodeMax;
};
//------------------------------------------------
@@ -440,8 +430,10 @@
//------------------------------------------------
[ Provider("cmpi:HA_MasterSlaveResourceProvider") ]
class HA_MasterSlaveResource : HA_ClusterResource {
- string MaxMasters;
- string MaxNodeMasters;
+ string CloneMax;
+ string CloneNodeMax;
+ string MaxMasters;
+ string MaxNodeMasters;
};
//----------------------------------------
@@ -528,7 +520,6 @@
[ Key ]
string SystemCreationClassName;
- string Type; /* rsc_order|rsc_colocation|rsc_location */
string Caption;
};
@@ -571,7 +562,7 @@
string Resource;
string Score;
- /* Rule should be a class in future */
+ [ Description ("Rules, in format: [attribute]<[operation]>[value]") ]
string Rule [];
};
@@ -592,7 +583,7 @@
//------------------------------------------------
// Association, HA_ResourceInstance
//------------------------------------------------
-
+/*
[ Association, Aggregation,
Provider("cmpi:HA_ResourceInstanceProvider") ]
class HA_ResourceInstance {
@@ -603,7 +594,7 @@
HA_InstanceAttributes REF Attributes;
String Caption;
};
-
+*/
//-----------------------------------------------
// Association, HA_SubResource
//-----------------------------------------------
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/mof/LinuxHA.reg,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- LinuxHA.reg 21 Dec 2005 17:00:34 -0000 1.5
+++ LinuxHA.reg 20 Mar 2006 03:24:34 -0000 1.6
@@ -12,7 +12,7 @@
# Master Slave Clone
HA_MasterSlaveResource root/cimv2 HA_MasterSlaveResourceProvider
HA_MasterSlaveResourceProvider instance
# Resource instance
-HA_InstanceAttributes root/cimv2 HA_InstanceAttributesProvider
HA_InstanceAttributesProvider instance
+#HA_InstanceAttributes root/cimv2 HA_InstanceAttributesProvider
HA_InstanceAttributesProvider instance
# Software
HA_SoftwareIdentity root/cimv2 HA_SoftwareIdentityProvider
HA_SoftwareIdentityProvider instance
# LocationConstraint
@@ -30,7 +30,7 @@
# Association, between Cluster and Software
HA_InstalledSoftwareIdentity root/cimv2 HA_InstalledSoftwareIdentityProvider
HA_InstalledSoftwareIdentityProvider instance association
# Association, between Resource and its instance attribute
-HA_ResourceInstance root/cimv2 HA_ResourceInstanceProvider
HA_ResourceInstanceProvider instance association
+#HA_ResourceInstance root/cimv2 HA_ResourceInstanceProvider
HA_ResourceInstanceProvider instance association
# Association, between Resource (Group/MasterSlave/Clone) and its sub resource
HA_SubResource root/cimv2 HA_SubResourceProvider HA_SubResourceProvider
instance association
# Association, operation and 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 28, Issue 47
********************************************