Hp 2000SA G2-Modular-Smart-Array Bedienungsanleitung Seite 35

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 48
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 34
5 Client API Interface
Client applications can use any supported client interface that is supported by the Pegasus CIMOM.
Please refer to http://cvs.opengroup.org/pegasus-doc/ClientInterfaces.html for more details on the
client interfaces supplied by Open Pegasus.
Provided below is a sample C++ client application to collect Disk asset information using the HP
MSA2000 G2 proxy provider. This application assumes that the proxy provider has already been
configured to manage at least one MSA2000 G2 system.
#include <Pegasus/Common/Thread.h>
#include <Pegasus/Common/Config.h>
#include <Pegasus/Common/Constants.h>
#include <Pegasus/Common/PegasusVersion.h>
#include <Pegasus/Common/PegasusAssert.h>
#include <Pegasus/Client/CIMClient.h>
#include <Pegasus/Common/CIMName.h>
#include <Pegasus/Common/OptionManager.h>
#include <Pegasus/Common/FileSystem.h>
#include <Pegasus/Common/Stopwatch.h>
#include <Pegasus/Common/Exception.h>
#include <Pegasus/Common/XmlWriter.h>
#include <Pegasus/Common/AutoPtr.h>
#include <Pegasus/Common/HostLocator.h>
PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;
static AtomicInt errorCount(0);
Array<CIMObjectPath> instanceRef;
void connectClient(
CIMClient *client,
String host,
Uint32 portNumber,
String userName,
String password,
Boolean useSSL,
Boolean localConnection,
Uint32 timeout)
{
try
{
client->setTimeout(timeout);
if (useSSL)
{
cout << "SSL not supported " << endl;
exit(1);
}
else
{
if (localConnection)
{
cout << "Using local connection mechanism " << endl;
client->connectLocal();
}
else
{
cout << "Connecting to " << host << ":" << portNumber << endl;
client->connect (host, portNumber, userName, password);
#define NAMESPACE CIMNamespaceName ("root/HPQ")
#define CLASSNAME CIMName ("DHS_TopComputerSystem")
// Locate the Top Computer System instance
Array<CIMInstance> cimNInstances =
client->enumerateInstances(NAMESPACE, CLASSNAME,
MSA2000 G2 SMI-S Proxy Provider User Guide 35
Seitenansicht 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 47 48

Kommentare zu diesen Handbüchern

Keine Kommentare