RE: Indication with OperationContext Object failed (in Pegasus 2.9.1)

Venkateswara R Puvvada <[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <OF509C555C.BFDED612-ON6525772A.003ED1A7-6525772A.0040889D@in.ibm.com>
Manjunath,

When subscription is created, Pegasus normalizes the subscription name by 
removing the namespace from the handler and filter names if they are 
created in the same namespace of the subscription being created. It seems 
Pegasus is comparing the normalized subscription name with provider set 
subscription name. 

Remove Namespace from filter and handler construction (root/PG_Interop in 
the example give below) from your provider code and verify if listener can 
receive the indications. If that works, i will file a bug against Pegasus.

Venkat




"Manjunath Marlabeeti" <[email protected]> 
21/05/2010 12:36

To
Venkateswara R Puvvada/India/IBM@IBMIN
cc
<[email protected]>
Subject
RE: Indication with OperationContext Object failed  (in Pegasus 2.9.1)






Hi Venkat,
 
Thanks for the reply.
Based on your suggestion I checked handler and filter values from 
Genrateindication and which are registerd with the cimserver. Below are 
the values.
 
(I have changed hardcoded the IP from 1.1.1.1 to 192.168.111.6)
 
Below 1 and 2 are the values of printf in Generateindication function 
after Handler and filter constructions.( printf("\nHandlerString 
%s\n",temp.c_str());)
 
1) filterString 
root/PG_InterOp:CIM_IndicationFilter.CreationClassName="CIM_IndicationFilter",Name="Filter20192.168.111.61192.168.111.6|1|1@",SystemCreationClassName=
"CIM_ComputerSystem",SystemName="CR-IN-MANJU"
 
2) HandlerString
root/PG_InterOp:CIM_IndicationHandlerCIMXML.CreationClassName="CIM_IndicationHandlerCIMXML",Name="Handler20192.168.111.61192.168.111.6|1|1@",Syst
emCreationClassName="CIM_ComputerSystem",SystemName="CR-IN-MANJU"
 
3) after execution of Java client 
values from command : cimsub -l s
NAMESPACE      root/PG_InterOp 
FILTER     root/PG_InterOp:Filter20192.168.111.61192.168.111.6|1|1@ 
HANDLER  
root/PG_InterOp:CIM_IndicationHandlerCIMXML.Handler20192.168.111.61192.168.111.6|1|1@ 
 
STATE    Enabled
 
with the above values I could not find the exact problem because 
corresponding handler and filter values are same.
please could you suggest me a solution based on the above values.
 
Thanks,
Manjunath.M
 
From: Venkateswara R Puvvada [mailto:[email protected]] 
Sent: Friday, May 21, 2010 11:54 AM
To: Manjunath Marlabeeti
Cc: [email protected]
Subject: Re: Indication with OperationContext Object failed (in Pegasus 
2.9.1)
 

Manjunath, 

If the indication provider sets SubscriptionInstanceNamesContainer in the 
operation context, the subset of subscriptions  specified by the 
indication provider should be part of the actual matched subscriptions for 
the indication. Any subscription included by the provider but not 
containing in the matched subscriptions list is ignored. In your case, the 
subscription name you have specified in the provider does not seem to be 
in the actual subscriptions matched for the indication. 

Venkat



"Manjunath Marlabeeti" <[email protected]> 
19/05/2010 18:07 


To
<[email protected]> 
cc

Subject
Indication with OperationContext Object failed  (in Pegasus 2.9.1)
 








Hi, 
  
I have written a simple indication provider it sends the indications to 
java client. 
While execution I observed one thing that in the below function if I 
deliver the indication without context object then the indications are 
received by the java client. 
If I deliver with OperationContext object then indications are not 
received by the Java client. But my requirement is indications needs to 
send with OperationContext object. 
Here I am copying the function 
  
Here is the function call 
GenerateIndication(_handler,CIMName("CRM_Indication"
),objBackInd,strObject,"1.1.1.1","1","1.1.1.1|1|1@"); 
//objBackInd is an indication object 
  
void GenerateIndication(IndicationResponseHandler *ptrObjHandler, const 
CIMName objMethodName,CIMInstance objBackInd,string &strObject,string 
IP,string ID,string operationID) 
{ 
      char buffer[32]; 
      sprintf(buffer, "%d", G_ui32NextUid++); 
      objBackInd.addProperty(CIMProperty ("IndicationIdentifier"
,String(buffer))); 
      char stringTime[MAX_CHARS]; 
      time_t currentTime=time(NULL); 
      sprintf(stringTime,"%ld",currentTime); 
      AddProperty("IndicationTime",stringTime,CMC_STRING,strObject); 
      CIMIndication cimIndication (objBackInd); 
      String filterString; 
      string temp; 
  
      Array <CIMObjectPath> subscriptionInstanceNames; 
      Array <CIMKeyBinding> subscriptionKeyBindings; 
      string filterConstruction=
"root/PG_InterOp:CIM_IndicationFilter.CreationClassName=\"CIM_IndicationFilter\",Name=\"Filter20"
; 
      filterConstruction=filterConstruction+IP+ID+operationID+
"\",SystemCreationClassName=\""; 
      filterString.append(filterConstruction.c_str()); 
      filterString.append (System::getSystemCreationClassName ()); 
      filterString.append ("\",SystemName=\""); 
      filterString.append (System::getFullyQualifiedHostName ()); 
      filterString.append ("\""); 
      subscriptionKeyBindings.append (CIMKeyBinding ("Filter"
,filterString, CIMKeyBinding::REFERENCE)); 
      temp = filterString.getCString(); 
      printf("\nfilterString  %s\n",temp.c_str()); 
  
      string HandlerConstruction=
"root/PG_InterOp:CIM_IndicationHandlerCIMXML.CreationClassName=\"CIM_IndicationHandlerCIMXML\",Name=\"Handler20"
; 
  
      HandlerConstruction     =     HandlerConstruction     + IP 
+ID+operationID+"\",SystemCreationClassName=\""; 
                  String handlerString; 
                  handlerString.append(HandlerConstruction.c_str()); 
                  handlerString.append (System::getSystemCreationClassName 
()); 
                  handlerString.append ("\",SystemName=\""); 
                  handlerString.append (System::getFullyQualifiedHostName 
()); 
                  handlerString.append ("\""); 
                  subscriptionKeyBindings.append (CIMKeyBinding ("Handler"
, handlerString, CIMKeyBinding::REFERENCE)); 
                  temp=handlerString.getCString(); 
             printf("\nHandlerString  %s\n",temp.c_str()); 
                CIMObjectPath subscriptionPath ("", 
                      CIMNamespaceName ("root/PG_InterOp"), 
                      CIMName ("CIM_IndicationSubscription"), 
                      subscriptionKeyBindings); 
                              subscriptionInstanceNames.append 
(subscriptionPath); 
  
            OperationContext context; 
                  context.insert (SubscriptionInstanceNamesContainer 
                      (subscriptionInstanceNames)); 
                      objBackInd.addProperty 
                                          (CIMProperty ("IpAddress"
,String(IP.c_str()))); 
                                          objBackInd.addProperty 
                                          (CIMProperty ("OperationId"
,String(operationID.c_str()))); 
                                          objBackInd.addProperty 
                                          (CIMProperty ("Uid"
,String(ID.c_str()))); 
//with Context object indications are not getting received by JAVA clien 
without Context java client is reciving indication 
  
      //ptrObjHandler->deliver (objBackInd);     
      ptrObjHandler->deliver (context, objBackInd); 
} 
  
Please can anyone correct me where exactly I am doing wrong. 
  
Thanks, 
Manjunath.M
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.