(file) Return to testSnmpHandler.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Handler / snmpIndicationHandler / tests / testclient

Diff for /pegasus/src/Pegasus/Handler/snmpIndicationHandler/tests/testclient/testSnmpHandler.cpp between version 1.6 and 1.7

version 1.6, 2007/06/26 20:26:16 version 1.7, 2007/06/29 17:43:11
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Yi Zhou, Hewlett-Packard Company (Yi.Zhou@hp.com)  
 //  
 // Modified By:  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/PegasusAssert.h> #include <Pegasus/Common/PegasusAssert.h>
Line 71 
Line 67 
 // //
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
  
 class T_Parms{  class T_Parms
   {
    public:    public:
     AutoPtr<CIMClient> client;     AutoPtr<CIMClient> client;
     Uint32 indicationSendCount;     Uint32 indicationSendCount;
Line 80 
Line 77 
  
 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
  
 CIMObjectPath _getFilterObjectPath  CIMObjectPath _getFilterObjectPath(const String & name)
     (const String & name)  
 { {
     Array<CIMKeyBinding> keyBindings;     Array<CIMKeyBinding> keyBindings;
     keyBindings.append (CIMKeyBinding ("SystemCreationClassName",     keyBindings.append (CIMKeyBinding ("SystemCreationClassName",
Line 96 
Line 92 
         PEGASUS_CLASSNAME_INDFILTER, keyBindings));         PEGASUS_CLASSNAME_INDFILTER, keyBindings));
 } }
  
 CIMObjectPath _getHandlerObjectPath  CIMObjectPath _getHandlerObjectPath(const String & name)
     (const String & name)  
 { {
     Array<CIMKeyBinding> keyBindings;     Array<CIMKeyBinding> keyBindings;
     keyBindings.append (CIMKeyBinding ("SystemCreationClassName",     keyBindings.append (CIMKeyBinding ("SystemCreationClassName",
Line 113 
Line 108 
         PEGASUS_CLASSNAME_INDHANDLER_SNMP, keyBindings));         PEGASUS_CLASSNAME_INDHANDLER_SNMP, keyBindings));
 } }
  
 CIMObjectPath _getSubscriptionObjectPath  CIMObjectPath _getSubscriptionObjectPath(
     (const String & filterName,      const String & filterName,
      const String & handlerName)      const String & handlerName)
 { {
     CIMObjectPath filterObjectPath = _getFilterObjectPath(filterName);     CIMObjectPath filterObjectPath = _getFilterObjectPath(filterName);
Line 130 
Line 125 
         PEGASUS_CLASSNAME_INDSUBSCRIPTION, subscriptionKeyBindings));         PEGASUS_CLASSNAME_INDSUBSCRIPTION, subscriptionKeyBindings));
 } }
  
 CIMObjectPath _createHandlerInstance  CIMObjectPath _createHandlerInstance(
     (CIMClient & client,      CIMClient & client,
      const String & name,      const String & name,
      const String & targetHost,      const String & targetHost,
      const String & securityName,      const String & securityName,
Line 157 
Line 152 
     handlerInstance.addProperty (CIMProperty (CIMName ("PortNumber"),     handlerInstance.addProperty (CIMProperty (CIMName ("PortNumber"),
         CIMValue ((Uint32) PORT_NUMBER)));         CIMValue ((Uint32) PORT_NUMBER)));
  
     return(client.createInstance (PEGASUS_NAMESPACENAME_INTEROP, handlerInstance));      return client.createInstance(
           PEGASUS_NAMESPACENAME_INTEROP, handlerInstance);
 } }
  
 CIMObjectPath _createFilterInstance  CIMObjectPath _createFilterInstance(
     (CIMClient & client,      CIMClient & client,
      const String & name,      const String & name,
      const String & query,      const String & query,
      const String & qlang)      const String & qlang)
Line 180 
Line 176 
     filterInstance.addProperty (CIMProperty (CIMName ("SourceNamespace"),     filterInstance.addProperty (CIMProperty (CIMName ("SourceNamespace"),
         SOURCE_NAMESPACE.getString ()));         SOURCE_NAMESPACE.getString ()));
  
     return(client.createInstance (PEGASUS_NAMESPACENAME_INTEROP, filterInstance));      return client.createInstance(PEGASUS_NAMESPACENAME_INTEROP, filterInstance);
 } }
  
 CIMObjectPath _createSubscriptionInstance  CIMObjectPath _createSubscriptionInstance(
     (CIMClient & client,      CIMClient & client,
      const CIMObjectPath & filterPath,      const CIMObjectPath & filterPath,
      const CIMObjectPath & handlerPath)      const CIMObjectPath & handlerPath)
 { {
Line 196 
Line 192 
     subscriptionInstance.addProperty (CIMProperty     subscriptionInstance.addProperty (CIMProperty
         (CIMName ("SubscriptionState"), CIMValue ((Uint16) 2)));         (CIMName ("SubscriptionState"), CIMValue ((Uint16) 2)));
  
     return(client.createInstance (PEGASUS_NAMESPACENAME_INTEROP, subscriptionInstance));      return client.createInstance(
           PEGASUS_NAMESPACENAME_INTEROP, subscriptionInstance);
 } }
  
 void _sendTestIndication(CIMClient* client, const CIMName & methodName,  void _sendTestIndication(
       CIMClient* client,
       const CIMName & methodName,
                          Uint32 indicationSendCount)                          Uint32 indicationSendCount)
 { {
     //     //
Line 227 
Line 226 
     PEGASUS_TEST_ASSERT (result == 0);     PEGASUS_TEST_ASSERT (result == 0);
 } }
  
 void _deleteSubscriptionInstance  void _deleteSubscriptionInstance(
     (CIMClient & client,      CIMClient & client,
      const String & filterName,      const String & filterName,
      const String & handlerName)      const String & handlerName)
 { {
     CIMObjectPath subscriptionObjectPath =     CIMObjectPath subscriptionObjectPath =
        _getSubscriptionObjectPath(filterName, handlerName);        _getSubscriptionObjectPath(filterName, handlerName);
     client.deleteInstance (PEGASUS_NAMESPACENAME_INTEROP, subscriptionObjectPath);      client.deleteInstance(
           PEGASUS_NAMESPACENAME_INTEROP, subscriptionObjectPath);
 } }
  
 void _deleteHandlerInstance  void _deleteHandlerInstance(
     (CIMClient & client,      CIMClient & client,
      const String & name)      const String & name)
 { {
     CIMObjectPath handlerObjectPath = _getHandlerObjectPath(name);     CIMObjectPath handlerObjectPath = _getHandlerObjectPath(name);
     client.deleteInstance (PEGASUS_NAMESPACENAME_INTEROP, handlerObjectPath);     client.deleteInstance (PEGASUS_NAMESPACENAME_INTEROP, handlerObjectPath);
 } }
  
 void _deleteFilterInstance  void _deleteFilterInstance(
     (CIMClient & client,      CIMClient & client,
      const String & name)      const String & name)
 { {
     CIMObjectPath filterObjectPath = _getFilterObjectPath(name);     CIMObjectPath filterObjectPath = _getFilterObjectPath(name);
Line 493 
Line 493 
         }         }
         catch (Exception & e)         catch (Exception & e)
         {         {
             cerr << "----- sendTestIndication failed: " << e.getMessage () << endl;              cerr << "----- sendTestIndication failed: " << e.getMessage () <<
                   endl;
             exit (-1);             exit (-1);
         }         }
         elapsedTime.stop();         elapsedTime.stop();
Line 637 
Line 638 
  
     Uint32 iterations = 0;     Uint32 iterations = 0;
  
     // Wait until snmptrapd startted      // Wait until snmptrapd started
     while (iterations < MAX_ITERATIONS)     while (iterations < MAX_ITERATIONS)
     {     {
         iterations++;         iterations++;
Line 667 
Line 668 
     }     }
 } }
  
 void _receiveExpectedTraps(CIMClient& workClient,  void _receiveExpectedTraps(
       CIMClient& workClient,
     Uint32 indicationSendCount,     Uint32 indicationSendCount,
     Uint32 runClientThreadCount)     Uint32 runClientThreadCount)
 { {
   
     CIMClient * clientConnections = new CIMClient[runClientThreadCount];     CIMClient * clientConnections = new CIMClient[runClientThreadCount];
  
     // determine total number of indication send count     // determine total number of indication send count


Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2