|
From: George v. <geo...@gm...> - 2014-06-30 06:44:00
|
Hi All,
I have a requirement to implement an indication interface into my provider
for an instance property changes. I had already implemented other interface
like get/enumerate/modify and its working fine.
To implement it , I have created a new class and its derived from
CIM_InstModification class. Please see the sample mof file for which I have
created it for it.
// ===================================================================
// GK_Test
// ===================================================================
[ Description("Class representing GK_Test"),
Provider("cmpi:cmpiGK_Test")
]
class GK_Test: CIM_LogicalElement
{
[Key, Description("This property is used to read the unique key id")]
string InstanceID;
boolean PowerEnabled;
boolean UserEnabled;
};
// ===================================================================
// GK_TestIndication
// ===================================================================
[ Indication,
Description ("Metric Process Indication"),
Provider("cmpi:cmpiGK_Test")
]
class GK_TestIndication : CIM_InstModification
{
boolean PowerEnabled;
boolean UserEnabled;
};
Then I implemented the below indication interface API's,
CMPIStatus GK_TestIndicationCleanup(
CMPIIndicationMI * mi,
const CMPIContext * ctx, CMPIBoolean terminate) ;
CMPIStatus GK_TestAuthorizeFilter(
CMPIIndicationMI * mi,
const CMPIContext * ctx,
#ifndef CMPI_VER_100
const CMPIResult * rslt,
#endif
const CMPISelectExp * filter,
const char * indType,
const CMPIObjectPath * classPath,
const char * owner);
CMPIStatus GK_TestMustPoll(
CMPIIndicationMI * mi,
const CMPIContext * ctx,
#ifndef CMPI_VER_100
const CMPIResult * rslt,
#endif
const CMPISelectExp * filter,
const char * indType,
const CMPIObjectPath * classPath) ;
CMPIStatus GK_TestActivateFilter(
CMPIIndicationMI * mi,
const CMPIContext * ctx,
#ifndef CMPI_VER_100
const CMPIResult * rslt,
#endif
const CMPISelectExp * filter,
const char * indType,
const CMPIObjectPath * classPath,
CMPIBoolean firstActivation) ;
CMPIStatus GK_TestDeActivateFilter(
CMPIIndicationMI * mi,
const CMPIContext * ctx,
#ifndef CMPI_VER_100
const CMPIResult * rslt,
#endif
const CMPISelectExp * filter,
const char * indType,
const CMPIObjectPath *classPath,
CMPIBoolean lastActivation);
CMPIStatus GK_TestEnableIndications(CMPIIndicationMI * mi, const
CMPIContext * ctx) ;
CMPIStatus GK_TestDisableIndications(CMPIIndicationMI * mi, const
CMPIContext * ctx) ;
I have facing the below issues. My requirement is to provide an instance of
any property changes. ie, in my class have two properties named PowerEnabled
& UserEnabled. So if any user has modified those properties, should return
an instance.
I need clarity to below questions,
1.What kind of the CIM request comes into provider? for example, I want to
get an instance whenever modifying the *PowerEnabled* property of class.
can you please provider sample cim request for it?
2.How to know in which property is subscribed in provider? and which
indication API and which parameter is used for get it?
Please see the .reg file for it.
[GK_Test]
provider: GK_Test
location: cmpiTestProvider
type: instance method
namespace: root/cimv2
#
[GK_TestIndication]
provider: GK_Test
location: cmpiTestProvider
type: indication
namespace: root/cimv2
#
Please reply, if any help from anybody which is very helpful for me.
Regards,
George
|