CIMClient Class Reference

#include <CIMClient.h>

Public Member Functions

 CIMClient ()
 
 ~CIMClient ()
 
Uint32 getTimeout () const
 
void setTimeout (Uint32 timeoutMilliseconds)
 
void connect (const String &host, const Uint32 portNumber, const String &userName, const String &password)
 
void connect (const String &host, const Uint32 portNumber, const SSLContext &sslContext, const String &userName, const String &password)
 
void connectLocal ()
 
void disconnect ()
 
void setRequestAcceptLanguages (const AcceptLanguageList &langs)
 
AcceptLanguageList getRequestAcceptLanguages () const
 
void setRequestContentLanguages (const ContentLanguageList &langs)
 
ContentLanguageList getRequestContentLanguages () const
 
ContentLanguageList getResponseContentLanguages () const
 
CIMClass getClass (const CIMNamespaceName &nameSpace, const CIMName &className, Boolean localOnly=true, Boolean includeQualifiers=true, Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList())
 
CIMInstance getInstance (const CIMNamespaceName &nameSpace, const CIMObjectPath &instanceName, Boolean localOnly=true, Boolean includeQualifiers=false, Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList())
 
void deleteClass (const CIMNamespaceName &nameSpace, const CIMName &className)
 
void deleteInstance (const CIMNamespaceName &nameSpace, const CIMObjectPath &instanceName)
 
void createClass (const CIMNamespaceName &nameSpace, const CIMClass &newClass)
 
CIMObjectPath createInstance (const CIMNamespaceName &nameSpace, const CIMInstance &newInstance)
 
void modifyClass (const CIMNamespaceName &nameSpace, const CIMClass &modifiedClass)
 
void modifyInstance (const CIMNamespaceName &nameSpace, const CIMInstance &modifiedInstance, Boolean includeQualifiers=true, const CIMPropertyList &propertyList=CIMPropertyList())
 
Array< CIMClassenumerateClasses (const CIMNamespaceName &nameSpace, const CIMName &className=CIMName(), Boolean deepInheritance=false, Boolean localOnly=true, Boolean includeQualifiers=true, Boolean includeClassOrigin=false)
 
Array< CIMNameenumerateClassNames (const CIMNamespaceName &nameSpace, const CIMName &className=CIMName(), Boolean deepInheritance=false)
 
Array< CIMInstanceenumerateInstances (const CIMNamespaceName &nameSpace, const CIMName &className, Boolean deepInheritance=true, Boolean localOnly=true, Boolean includeQualifiers=false, Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList())
 
Array< CIMObjectPathenumerateInstanceNames (const CIMNamespaceName &nameSpace, const CIMName &className)
 
Array< CIMObjectexecQuery (const CIMNamespaceName &nameSpace, const String &queryLanguage, const String &query)
 
Array< CIMObjectassociators (const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &assocClass=CIMName(), const CIMName &resultClass=CIMName(), const String &role=String::EMPTY, const String &resultRole=String::EMPTY, Boolean includeQualifiers=false, Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList())
 
Array< CIMObjectPathassociatorNames (const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &assocClass=CIMName(), const CIMName &resultClass=CIMName(), const String &role=String::EMPTY, const String &resultRole=String::EMPTY)
 
Array< CIMObjectreferences (const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &resultClass=CIMName(), const String &role=String::EMPTY, Boolean includeQualifiers=false, Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList())
 
Array< CIMObjectPathreferenceNames (const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &resultClass=CIMName(), const String &role=String::EMPTY)
 
CIMValue getProperty (const CIMNamespaceName &nameSpace, const CIMObjectPath &instanceName, const CIMName &propertyName)
 
void setProperty (const CIMNamespaceName &nameSpace, const CIMObjectPath &instanceName, const CIMName &propertyName, const CIMValue &newValue=CIMValue())
 
CIMQualifierDecl getQualifier (const CIMNamespaceName &nameSpace, const CIMName &qualifierName)
 
void setQualifier (const CIMNamespaceName &nameSpace, const CIMQualifierDecl &qualifierDeclaration)
 
void deleteQualifier (const CIMNamespaceName &nameSpace, const CIMName &qualifierName)
 
Array< CIMQualifierDeclenumerateQualifiers (const CIMNamespaceName &nameSpace)
 
CIMValue invokeMethod (const CIMNamespaceName &nameSpace, const CIMObjectPath &instanceName, const CIMName &methodName, const Array< CIMParamValue > &inParameters, Array< CIMParamValue > &outParameters)
 
void registerClientOpPerformanceDataHandler (ClientOpPerformanceDataHandler &handler)
 
void deregisterClientOpPerformanceDataHandler ()
 
Array< CIMInstanceopenEnumerateInstances (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, const CIMNamespaceName &nameSpace, const CIMName &className, Boolean deepInheritance=true, Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList(), const String &filterQueryLanguage=String::EMPTY, const String &filterQuery=String::EMPTY, const Uint32Arg &operationTimeout=Uint32Arg(), Boolean continueOnError=false, Uint32 maxObjectCount=0)
 
Array< CIMObjectPathopenEnumerateInstancePaths (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, const CIMNamespaceName &nameSpace, const CIMName &className, const String &filterQueryLanguage=String::EMPTY, const String &filterQuery=String::EMPTY, const Uint32Arg &operationTimeout=Uint32Arg(), Boolean continueOnError=false, Uint32 maxObjectCount=0)
 
Array< CIMInstanceopenReferenceInstances (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &resultClass=CIMName(), const String &role=String::EMPTY, const Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList(), const String &filterQueryLanguage=String::EMPTY, const String &filterQuery=String::EMPTY, const Uint32Arg &operationTimeout=Uint32Arg(), Boolean continueOnError=false, Uint32 maxObjectCount=0)
 
Array< CIMObjectPathopenReferenceInstancePaths (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &resultClass=CIMName(), const String &role=String::EMPTY, const String &filterQueryLanguage=String::EMPTY, const String &filterQuery=String::EMPTY, const Uint32Arg &operationTimeout=Uint32Arg(), Boolean continueOnError=false, Uint32 maxObjectCount=0)
 
Array< CIMInstanceopenAssociatorInstances (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &assocClass=CIMName(), const CIMName &resultClass=CIMName(), const String &role=String::EMPTY, const String &resultRole=String::EMPTY, Boolean includeClassOrigin=false, const CIMPropertyList &propertyList=CIMPropertyList(), const String &filterQueryLanguage=String::EMPTY, const String &filterQuery=String::EMPTY, const Uint32Arg &operationTimeout=Uint32Arg(), Boolean continueOnError=false, Uint32 maxObjectCount=0)
 
Array< CIMObjectPathopenAssociatorInstancePaths (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, const CIMNamespaceName &nameSpace, const CIMObjectPath &objectName, const CIMName &assocClass=CIMName(), const CIMName &resultClass=CIMName(), const String &role=String::EMPTY, const String &resultRole=String::EMPTY, const String &filterQueryLanguage=String::EMPTY, const String &filterQuery=String::EMPTY, const Uint32Arg &operationTimeout=Uint32Arg(), Boolean continueOnError=false, Uint32 maxObjectCount=0)
 
Array< CIMInstanceopenQueryInstances (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, const CIMNamespaceName &nameSpace, const String &queryLanguage, const String &query, CIMClass &queryResultClass, Boolean returnQueryResultClass=false, const Uint32Arg &operationTimeout=Uint32Arg(), Boolean continueOnError=false, Uint32 maxObjectCount=0)
 
Array< CIMInstancepullInstancesWithPath (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, Uint32 maxObjectCount)
 
Array< CIMObjectPathpullInstancePaths (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, Uint32 maxObjectCount)
 
Array< CIMInstancepullInstances (CIMEnumerationContext &enumerationContext, Boolean &endOfSequence, Uint32 maxObjectCount)
 
void closeEnumeration (CIMEnumerationContext &enumerationContext)
 
Uint64Arg enumerationCount (CIMEnumerationContext &enumerationContext)
 

Detailed Description

The CIMClient class provides an interface for a client application to communicate with a CIM Server. The client application specifies the target CIM Server by providing connection parameters and authentication credentials (as necessary).

The CIMClient class models the functionality defined in the DMTF's Specification for CIM Operations over HTTP (DSP0200) version 1.2, using similar operations and parameters.

Constructor & Destructor Documentation

◆ CIMClient()

CIMClient::CIMClient ( )

Constructs a CIMClient object.

◆ ~CIMClient()

CIMClient::~CIMClient ( )

Destructs a CIMClient object.

Member Function Documentation

◆ associatorNames()

Array<CIMObjectPath> CIMClient::associatorNames ( const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName assocClass = CIMName(),
const CIMName resultClass = CIMName(),
const String role = String::EMPTY,
const String resultRole = String::EMPTY 
)

Enumerates the names of CIM Objects (Classes or Instances) which are associated with a specified Object in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
objectNameA CIMObjectPath that specifies the CIM Object for which to enumerate the names of associated Objects. It may contain either a Class name or Instance name (model path).
assocClassA CIMName specifying an association class constraint. If not NULL, the returned Object names are to be limited to those associated with the specified Object via an Instance of this Class or one of its subclasses.
resultClassA CIMName specifying a result filter. If not NULL, each returned name is to identify an Object which either is an Instance of this Class (or one of its subclasses) or is this Class (or one of its subclasses).
roleA String specifying a role filter. If not the empty String, each returned Object name is to be associated to the specified Object via an Association in which the specified Object plays the specified role (I.e., the role value matches the name of the Property in the Association Class that refers to the specified object).
resultRoleA String specifying a result role filter. If not the empty String, each returned Object name is to be associated to the specified Object via an Association in which the returned Object name plays the specified role (I.e., the role value matches the name of the Property in the Association Class that refers to the returned Object name).
Returns
An Array of zero or more CIMObjectPaths containing the names of associated Classes or Instances.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ associators()

Array<CIMObject> CIMClient::associators ( const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName assocClass = CIMName(),
const CIMName resultClass = CIMName(),
const String role = String::EMPTY,
const String resultRole = String::EMPTY,
Boolean  includeQualifiers = false,
Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList() 
)

Enumerates CIM Objects (Classes or Instances) which are associated with a specified Object in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
objectNameA CIMObjectPath that specifies the CIM Object for which to enumerate associated Objects. It may contain either a Class name or Instance name (model path).
assocClassA CIMName specifying an association class constraint. If not NULL, the returned Objects are to be limited to those associated with the specified Object via an Instance of this Class or one of its subclasses.
resultClassA CIMName specifying a result filter. If not NULL, each returned Object is to be either an Instance of this Class (or one of its subclasses) or be this Class (or one of its subclasses).
roleA String specifying a role filter. If not the empty String, each returned Object is to be associated to the specified Object via an Association in which the specified Object plays the specified role (I.e., the role value matches the name of the Property in the Association Class that refers to the specified object).
resultRoleA String specifying a result role filter. If not the empty String, each returned Object is to be associated to the specified Object via an Association in which the returned Object plays the specified role (I.e., the role value matches the name of the Property in the Association Class that refers to the returned Object).
includeQualifiers(DEPRECATED) A Boolean indicating whether the Qualifiers for each Object are to be included in the response. If false, no Qualifiers are requested. If not specified, this parameter defaults to false.
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of each returned Object. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
propertyListA CIMPropertyList which optionally limits the Property elements included in the returned Objects. If not NULL, the returned Objects are not to include Properties that are omitted from the list. If NULL, no specific filtering of Properties is requested. (An empty list, distinct from a NULL list, indicates that no Properties are to be included in the returned Objects.) If not specified, this parameter defaults to NULL.
Returns
An Array of zero or more CIMObjects containing the associated Classes or Instances.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ closeEnumeration()

void CIMClient::closeEnumeration ( CIMEnumerationContext &  enumerationContext)

The closeEnumeration operation closes an open enumeration sequence represented by a valid enumerationContext parameter. This operation is not required execept in the case where the client wishes to close the operation before the server has returned endOfSequence = true for an enumeration sequence. If the server has previously returned endOfSequence = true the sequence is considered closed and a subsequent close will be rejected by the server. The closeEnumeration operation may be issued concurrently with an outstanding pull operation for some servers NOTE: NOT sure that Pegasus actually would support this.

If the Pull operation cannot be abandoned, it shall proceed as if the CloseEnumeration operation has not been issued, and the CloseEnumeration operation shall return a failure with the status code CIM_ERR_PULL_CANNOT_BE_ABANDONED.

If CloseEnumeration is unsuccessful, this operation shall return one of the following status codes, where the error returned is the first applicable error in the list, starting with the first element and working down. Any additional operation-specific interpretation of the error is enclosed in parentheses.

Parameters
enumerationContextCIMEnumerationContext returned by a previous open or pull operation for the enumeration sequence.
endOfSequenceBoolean output parameter indicates when the enumeration sequence is complete. if endofSequence is true upon successful completion of the operation, the sequence is complete and the enumerationContext can be assumed to be invalid for any future operations. If the endOfSequence is false additional elements may be available from the server.
maxObjectCountUint32 input parameter (required) that defines the maximum number of instances that may be returned by the server. Any Uint32 integer is allowed including 0. The client may use the value zero to tell the server to keep the enumeration sequence open without retrieving any instances. Whereas this is an optional parameter for the Open... operation is is required for all of the pull... operations.
Returns
If the closeEnumeration is successful any resources used by the server are released and the enumerationContext is no longer valid.

If not successful the operation returns one of the following exceptions:

  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_SERVER_IS_SHUTTING_DOWN
  • CIM_ERR_NOT_SUPPORTED
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER
  • CIM_ERR_INVALID_ENUMERATION_CONTEXT
  • CIM_ERR_PULL_CANNON_BE_ABANDONED
  • CIM_ERR_FAILED
Version
2.1.4

◆ connect() [1/2]

void CIMClient::connect ( const String host,
const Uint32  portNumber,
const String userName,
const String password 
)

Connects to the CIM Server at the specified host name and port number. Example usage:

    CIMClient client;
    String host("localhost");
    try
    {
        client.connect(host, 5988, "guest", "guest");
    }
    catch (Exception& e)
    {
        cerr << "Pegasus Exception: " << e.getMessage() <<
            ". Trying to connect to " << host << endl;
    }
Parameters
hostA String host name to connect to. If host is an empty string and portNumber is 0, the client will attempt to connect to the server's unix domain socket (on supporting platforms).
portNumberA Uint32 port number to connect to.
userNameA String specifying the user name for the connection.
passwordA String containing the password of the specified user.
Exceptions
AlreadyConnectedExceptionIf the CIMClient is already connected to a CIM Server.
InvalidLocatorExceptionIf the specified address is improperly formed.
CannotCreateSocketExceptionIf a socket cannot be created.
CannotConnectExceptionIf the socket connection fails.
CIMClientConnectionExceptionIf any other failure occurs.

◆ connect() [2/2]

void CIMClient::connect ( const String host,
const Uint32  portNumber,
const SSLContext sslContext,
const String userName,
const String password 
)

Connects to the CIM Server at the specified host name, port number and SSL context.

Parameters
hostA String host name to connect to.
portNumberA Uint32 port number to connect to.
sslContextThe SSL context to use for this connection.
userNameA String specifying the user name for the connection.
passwordA String containing the password of the specified user.
Exceptions
AlreadyConnectedExceptionIf the CIMClient is already connected to a CIM Server.
InvalidLocatorExceptionIf the specified address is improperly formed.
CannotCreateSocketExceptionIf a socket cannot be created.
CannotConnectExceptionIf the socket connection fails.
CIMClientConnectionExceptionIf any other failure occurs.

◆ connectLocal()

void CIMClient::connectLocal ( )

Connects to the local CIM Server as the current user. Authentication is performed automatically, so no credentials are required for this connection.

Exceptions
AlreadyConnectedExceptionIf the CIMClient is already connected to a CIM Server.
CannotCreateSocketExceptionIf a socket cannot be created.
CannotConnectExceptionIf the socket connection fails.
CIMClientConnectionExceptionIf any other failure occurs.

◆ createClass()

void CIMClient::createClass ( const CIMNamespaceName nameSpace,
const CIMClass newClass 
)

Creates a specified CIM Class in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
newClassA CIMClass containing the new Class definition to be created.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ createInstance()

CIMObjectPath CIMClient::createInstance ( const CIMNamespaceName nameSpace,
const CIMInstance newInstance 
)

Creates a specified CIM Instance in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
newInstanceA CIMInstance containing the new Instance to be created.
Returns
A CIMObjectPath containing the name of the newly created Instance.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ deleteClass()

void CIMClient::deleteClass ( const CIMNamespaceName nameSpace,
const CIMName className 
)

Deletes a specified CIM Class from a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
classNameA CIMName that specifies the CIM Class to be deleted.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ deleteInstance()

void CIMClient::deleteInstance ( const CIMNamespaceName nameSpace,
const CIMObjectPath instanceName 
)

Deletes a specified CIM Instance from a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
instanceNameA CIMObjectPath that identifies the CIM Instance to be deleted.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ deleteQualifier()

void CIMClient::deleteQualifier ( const CIMNamespaceName nameSpace,
const CIMName qualifierName 
)

Deletes a Qualifier declaration in a target Namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
qualifierNameA CIMName containing the name of the Qualifier to be deleted.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ deregisterClientOpPerformanceDataHandler()

void CIMClient::deregisterClientOpPerformanceDataHandler ( )

Unregisters the current ClientOpPerformanceDataHandler, if applicable.

◆ disconnect()

void CIMClient::disconnect ( )

Disconnects from the CIM Server. If no connection is established, this method has no effect. A CIMClient with an existing connection must be disconnected before establishing a new connection.

◆ enumerateClasses()

Array<CIMClass> CIMClient::enumerateClasses ( const CIMNamespaceName nameSpace,
const CIMName className = CIMName(),
Boolean  deepInheritance = false,
Boolean  localOnly = true,
Boolean  includeQualifiers = true,
Boolean  includeClassOrigin = false 
)

Enumerates CIM Classes derived from a specified Class in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
classNameA CIMName that specifies the CIM Class for which to enumerate derived Classes. If NULL, the Classes which have no superclass are enumerated.
deepInheritanceA Boolean indicating whether the enumeration should include all levels of derivation. If false, only the immediate subclasses are enumerated. If not specified, this parameter defaults to false.
localOnlyA Boolean indicating whether only the elements (properties, methods, and qualifiers) defined or overridden within the definition of each Class are to be returned. If false, all elements are requested. If not specified, this parameter defaults to true.
includeQualifiersA Boolean indicating whether the Qualifiers for each Class (including Qualifiers on the Class and on any returned Properties, Methods, or Method Parameters) are to be included in the response. If false, no Qualifiers are requested. If not specified, this parameter defaults to true.
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of each returned Class. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
Returns
An Array of zero or more CIMClass objects containing the requested Class definitions.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ enumerateClassNames()

Array<CIMName> CIMClient::enumerateClassNames ( const CIMNamespaceName nameSpace,
const CIMName className = CIMName(),
Boolean  deepInheritance = false 
)

Enumerates the names of CIM Classes derived from a specified Class in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
classNameA CIMName that specifies the CIM Class for which to enumerate the names of derived Classes. If NULL, the names of Classes which have no superclass are enumerated.
deepInheritanceA Boolean indicating whether the enumeration should include all levels of derivation. If false, only the names of immediate subclasses are enumerated. If not specified, this parameter defaults to false.
Returns
An Array of zero or more CIMName objects containing the requested Class names.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ enumerateInstanceNames()

Array<CIMObjectPath> CIMClient::enumerateInstanceNames ( const CIMNamespaceName nameSpace,
const CIMName className 
)

Enumerates the names of CIM Instances of a specified Class and its subclasses in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
classNameA CIMName that specifies the CIM Class for which to enumerate Instance names.
Returns
An Array of zero or more CIMObjectPaths containing the requested Instance names. Host and namespace attributes are not included in these CIMObjectPath values, per the WBEM protocol.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ enumerateInstances()

Array<CIMInstance> CIMClient::enumerateInstances ( const CIMNamespaceName nameSpace,
const CIMName className,
Boolean  deepInheritance = true,
Boolean  localOnly = true,
Boolean  includeQualifiers = false,
Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList() 
)

Enumerates CIM Instances of a specified Class and its subclasses in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
classNameA CIMName that specifies the CIM Class for which to enumerate Instances.
localOnly(DEPRECATED) A Boolean indicating whether only the properties and qualifiers defined or overridden within each Instance are to be returned. If false, all elements are requested. If not specified, this parameter defaults to true.
deepInheritanceA Boolean indicating whether the returned Instances should include properties defined in subclasses of the specified class. If false, only properties defined in the specified class are requested. If not specified, this parameter defaults to true.
includeQualifiers(DEPRECATED) A Boolean indicating whether the Qualifiers for each Instance (including Qualifiers on the Instance and on any returned Properties) are to be included in the response. If false, no Qualifiers are requested. If not specified, this parameter defaults to false.
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of each returned Instance. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
propertyListA CIMPropertyList which optionally limits the Property elements included in the returned Instances. If not NULL, the returned Instances are not to include Properties that are omitted from the list. If NULL, no specific filtering of Properties is requested. (An empty list, distinct from a NULL list, indicates that no Properties are to be included in the returned Instances.) Note that this parameter acts as an additional filter in conjunction with the deepInheritance and localOnly parameters. If not specified, this parameter defaults to NULL.
Returns
An Array of zero or more CIMInstance objects containing the requested Instances.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ enumerateQualifiers()

Array<CIMQualifierDecl> CIMClient::enumerateQualifiers ( const CIMNamespaceName nameSpace)

Enumerates Qualifier declarations in a target Namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
Returns
An Array of zero or more CIMQualifierDecl objects.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ enumerationCount()

Uint64Arg CIMClient::enumerationCount ( CIMEnumerationContext &  enumerationContext)

The enumerationCount operation returns an estimate of the total number of objects in an open enumerationContext.

This is an optional operation and may not be implemented. If not supported the server will return CIM_NOT_SUPPORTED.

Parameters
enumerationContextidentifies the enumeration session(returned from an Open... function for the enumerationCount function. This must be a valid enumerationContext for an open enumeration sequence
Returns
Uint64Arg containing either an estimate of the the number of objects remaining to be returned for the enumeration sequence defined by the enumerationContext argument or NULL if it cannot return a value.

If not successful the operation returns one of the following exceptions:

  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_SERVER_IS_SHUTTING_DOWN
  • CIM_ERR_NOT_SUPPORTED
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER
  • CIM_ERR_INVALID_ENUMERATION_CONTEXT
  • CIM_ERR_PULL_CANNON_BE_ABANDONED
  • CIM_ERR_FAILED
Version
2.1.4

◆ execQuery()

Array<CIMObject> CIMClient::execQuery ( const CIMNamespaceName nameSpace,
const String queryLanguage,
const String query 
)

Executes a query against a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
queryLanguageDefines the query language in which the query parameter is expressed.
querySpecifies the query to be executed.
Returns
An Array of zero or more CIM Classes or Instances that comprise the query result.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ getClass()

CIMClass CIMClient::getClass ( const CIMNamespaceName nameSpace,
const CIMName className,
Boolean  localOnly = true,
Boolean  includeQualifiers = true,
Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList() 
)

Gets a specified CIM Class from a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
classNameA CIMName that specifies the CIM Class to be retrieved.
localOnlyA Boolean indicating whether only the elements (properties, methods, and qualifiers) defined or overridden within the definition of the Class are to be returned. If false, all elements are requested. If not specified, this parameter defaults to true.
includeQualifiersA Boolean indicating whether the Qualifiers for the Class (including Qualifiers on the Class and on any returned Properties, Methods, or Method Parameters) are to be included in the response. If false, no Qualifiers are requested. If not specified, this parameter defaults to true.
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of the returned Class. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
propertyListA CIMPropertyList which optionally limits the Property elements included in the returned Class. If not NULL, the returned Class is not to include Properties that are omitted from the list. If NULL, no specific filtering of Properties is requested. (An empty list, distinct from a NULL list, indicates that no Properties are to be included in the returned Class.) Note that this parameter acts as an additional filter in conjunction with the localOnly parameter. If not specified, this parameter defaults to NULL.
Returns
A CIMClass containing the requested Class definition.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ getInstance()

CIMInstance CIMClient::getInstance ( const CIMNamespaceName nameSpace,
const CIMObjectPath instanceName,
Boolean  localOnly = true,
Boolean  includeQualifiers = false,
Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList() 
)

Gets a specified CIM Instance from a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
instanceNameA CIMObjectPath that identifies the CIM Instance to be retrieved.
localOnly(DEPRECATED) A Boolean indicating whether only the properties and qualifiers defined or overridden within the Instance are to be returned. If false, all elements are requested. If not specified, this parameter defaults to true.
includeQualifiers(DEPRECATED) A Boolean indicating whether the Qualifiers for the Instance (including Qualifiers on the Instance and on any returned Properties) are to be included in the response. If false, no Qualifiers are requested. If not specified, this parameter defaults to false.
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of the returned Instance. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
propertyListA CIMPropertyList which optionally limits the Property elements included in the returned Instance. If not NULL, the returned Instance is not to include Properties that are omitted from the list. If NULL, no specific filtering of Properties is requested. (An empty list, distinct from a NULL list, indicates that no Properties are to be included in the returned Instance.) Note that this parameter acts as an additional filter in conjunction with the localOnly parameter. If not specified, this parameter defaults to NULL.
Returns
A CIMInstance containing the requested Instance.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ getProperty()

CIMValue CIMClient::getProperty ( const CIMNamespaceName nameSpace,
const CIMObjectPath instanceName,
const CIMName propertyName 
)

Gets a single Property value from a CIM Instance in a target Namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
instanceNameA CIMObjectPath that identifies the CIM Instance from which to retrieve the Property value.
propertyNameA String containing the name of the Property for which to retrieve the value.
Returns
A CIMValue containing the requested Property value.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ getQualifier()

CIMQualifierDecl CIMClient::getQualifier ( const CIMNamespaceName nameSpace,
const CIMName qualifierName 
)

Gets a Qualifier declaration from a target Namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
qualifierNameA CIMName that identifies the Qualifier for which to retrieve the declaration.
Returns
A CIMQualifierDecl containing the requested Qualifier declaration.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ getRequestAcceptLanguages()

AcceptLanguageList CIMClient::getRequestAcceptLanguages ( ) const

Gets the accept languages currently configured for this client. Accept languages are the preferred languages for response data.

Returns
An AcceptLanguageList object specifying the preferred languages configured for this client.

◆ getRequestContentLanguages()

ContentLanguageList CIMClient::getRequestContentLanguages ( ) const

Gets the content languages currently configured for this client. The content languages indicate the languages associated with request data sent from this client.

Returns
A ContentLanguageList object specifying the languages used in request data from this client.

◆ getResponseContentLanguages()

ContentLanguageList CIMClient::getResponseContentLanguages ( ) const

Gets the content languages of the last response received by this client. The content languages indicate the languages associated with the data included in the response.

Returns
A ContentLanguageList object specifying the languages used in the last response received by this client.

◆ getTimeout()

Uint32 CIMClient::getTimeout ( ) const

Gets the currently configured timeout value for the CIMClient object.

Returns
An integer indicating the currently configured timeout value (in milliseconds).

◆ invokeMethod()

CIMValue CIMClient::invokeMethod ( const CIMNamespaceName nameSpace,
const CIMObjectPath instanceName,
const CIMName methodName,
const Array< CIMParamValue > &  inParameters,
Array< CIMParamValue > &  outParameters 
)

Executes an extrinsic CIM method in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
instanceNameA CIMObjectPath that defines the CIM Class or Instance on which to execute the method.
methodNameA CIMName the specifies the name of the method to execute.
inParametersAn Array of CIMParamValue objects specifying the input parameters for the method.
outParametersAn output Array of CIMParamValue objects containing the method output parameters.
Returns
A CIMValue containing the method return value.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ modifyClass()

void CIMClient::modifyClass ( const CIMNamespaceName nameSpace,
const CIMClass modifiedClass 
)

Modifies a specified CIM Class in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
modifiedClassA CIMClass containing the updates to be made to the Class definition.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ modifyInstance()

void CIMClient::modifyInstance ( const CIMNamespaceName nameSpace,
const CIMInstance modifiedInstance,
Boolean  includeQualifiers = true,
const CIMPropertyList propertyList = CIMPropertyList() 
)

Modifies a specified CIM Instance in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
modifiedInstanceA CIMInstance containing the name of the Instance to be modified (specified by the Path attribute) and the updates to be made to the Instance.
includeQualifiers(DEPRECATED) A Boolean indicating whether the Qualifiers for the Instance (including Qualifiers on the Instance and its Properties) are to be updated. If not specified, this parameter defaults to true.
propertyListA CIMPropertyList which optionally limits the Property elements that are updated. If not NULL, Properties that are omitted from the list are not updated. If NULL, all Properties are updated. (An empty list, distinct from a NULL list, indicates that no Properties are to be updated.) If not specified, this parameter defaults to NULL.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ openAssociatorInstancePaths()

Array<CIMObjectPath> CIMClient::openAssociatorInstancePaths ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName assocClass = CIMName(),
const CIMName resultClass = CIMName(),
const String role = String::EMPTY,
const String resultRole = String::EMPTY,
const String filterQueryLanguage = String::EMPTY,
const String filterQuery = String::EMPTY,
const Uint32Arg &  operationTimeout = Uint32Arg(),
Boolean  continueOnError = false,
Uint32  maxObjectCount = 0 
)

The openAssociatorInstancePaths method opens an enumeration sequence to get instance paths associated with a CIM Instance(the objectName parameter) in the target Namespace and returns zero or more CIMObjectPaths. This function is the pull parallel to the associatorNames function. but requires that an InstancePath be supplied (not just a ClassPath).

Parameters
enumerationContextSee enumerationContext parameter for openEnumerateInstances request.
endOfSequenceSee endOfSequence parameter for openEnumerateInstances request.
nameSpaceSee nameSpace parameter for openEnumerateInstances request.
objectNameThe objectName input parameter defines the instance that is the basis for the enumeration. This must be an instance path whereas the associatorNames< function will accept either instance path or class path
resultClassCIMName input parameter that defines a filter on the associated CIMObjectPath set to be returned.
roleString input parameter that defines a filter on the roles of associated CIMObjectPath to be returned.
resultRoleString input parameter that defines a filter on the roles of associated CIMObjectPath to be returned
filterQueryLanguageSee filterQueryLanguage argument for openEnumerateInstances request
filterQuerySee filterQuery parameter for openEnumerateInstances request
operationTimeoutSee operationTimeout parameter for openEnumerateInstances request.
continueOnError- See continueOnError parameter for openEnumerateInstances request.
maxObjectCount- See maxObjectCount parameter for openEnumerateInstances request.
Returns
If successful, the method returns zero or more CIMObjectPaths that meet the required criteria.

If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

<UL>
  <LI>CIM_ERR_ACCESS_DENIED
  <LI>CIM_ERROR_SERVER_IS_SHUTTING_DOWN
  <LI>CIM_ERR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_NAMESPACE
  <LI>CIM_ERR_INVALID_OPERATION_TIMEOUT
  <LI>CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_PARAMETER (including missing,
        duplicate, unrecognized or otherwise incorrect parameters)
  <LI>CIM_ERR_INVALID_CLASS (the CIM Class that is the
        basis for this enumeration does not exist)
  <LI>CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED
  <LI>CIM_ERR_QUERY_LANGUAGE_NOT_SUPPPORTED
  <LI> CIM_ERR_INVALID_QUERY
  <LI>CIM_ERR_FAILED (some other unspecified error occurred)</LI>
</UL>
Version
2.1.4

◆ openAssociatorInstances()

Array<CIMInstance> CIMClient::openAssociatorInstances ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName assocClass = CIMName(),
const CIMName resultClass = CIMName(),
const String role = String::EMPTY,
const String resultRole = String::EMPTY,
Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList(),
const String filterQueryLanguage = String::EMPTY,
const String filterQuery = String::EMPTY,
const Uint32Arg &  operationTimeout = Uint32Arg(),
Boolean  continueOnError = false,
Uint32  maxObjectCount = 0 
)

The openAssociatorInstances method opens an enumeration sequence to get instances associated with a CIM Instance(the objectName parameter) in the target Namespace and returns zero or more CIMInstances. This function is the pull parallel to the associators function but returns CIMInstances rather than CIMObjects and requires that a InstancePath be supplied (not just a ClassPath).

Parameters
enumerationContextSee enumerationContext parameter for openEnumerateInstances request.
endOfSequenceSee endOfSequence parameter for openEnumerateInstances request.
nameSpaceSee nameSpace parameter for openEnumerateInstances request.
objectNameThe objectName input parameter defines the instance that is the basis for the enumeration.
resultClassCIMName input parameter that defines a filter on the reference instances set to be returned.
roleString input parameter that defines a filter on the roles of associated instances to be returned.
resultRoleString input parameter that defines a filter on the roles of associated instances to be returned
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of the returned Instance. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
propertyListSee propertyList parameter for openEnumerateInstances request
filterQueryLanguageSee filterQueryLanguage argument for openEnumerateInstances request
filterQuerySee filterQuery parameter for openEnumerateInstances request
operationTimeoutSee operationTimeout parameter for openEnumerateInstances request.
continueOnError- See continueOnError parameter for openEnumerateInstances request.
maxObjectCount- See maxObjectCount parameter for openEnumerateInstances request.
Returns
If successful, the method returns zero or more CIMInstances that meet the required criteria.

If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

<UL>
  <LI>CIM_ERR_ACCESS_DENIED
  <LI>CIM_ERROR_SERVER_IS_SHUTTING_DOWN
  <LI>CIM_ERR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_NAMESPACE
  <LI>CIM_ERR_INVALID_OPERATION_TIMEOUT
  <LI>CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_PARAMETER (including missing,
        duplicate, unrecognized or otherwise incorrect parameters)
  <LI>CIM_ERR_INVALID_CLASS (the CIM Class that is the
        basis for this enumeration does not exist)
  <LI>CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED
  <LI>CIM_ERR_QUERY_LANGUAGE_NOT_SUPPPORTED
  <LI> CIM_ERR_INVALID_QUERY
  <LI>CIM_ERR_FAILED (some other unspecified error occurred)</LI>
</UL>
Version
2.1.4

◆ openEnumerateInstancePaths()

Array<CIMObjectPath> CIMClient::openEnumerateInstancePaths ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
const CIMNamespaceName nameSpace,
const CIMName className,
const String filterQueryLanguage = String::EMPTY,
const String filterQuery = String::EMPTY,
const Uint32Arg &  operationTimeout = Uint32Arg(),
Boolean  continueOnError = false,
Uint32  maxObjectCount = 0 
)

The openenumerateInstancePaths method opens an enumeration context to enumerate CIMObjectPaths of a CIM Class in the target Namespace and optionally returns zero or more CIMObjectPaths. This is the pull equivalent of the EnumerateInstanceNames method.

Parameters
enumerationContextSee enumerationContext parameter for openEnumerateInstances request.
endOfSequenceSee endOfSequence parameter for openEnumerateInstances request.
nameSpaceSee nameSpace parameter for openEnumerateInstances request.
classNameThe className input parameter defines the Class that is the basis for the enumeration.
filterQueryLanguageSee filterQueryLanguage argument for openEnumerateInstances request
filterQuerySee filterQuery parameter for openEnumerateInstances request
operationTimeoutSee operationTimeout parameter for openEnumerateInstances request.
continueOnError- See continueOnError parameter for openEnumerateInstances request.
maxObjectCount- See maxObjectCount parameter for openEnumerateInstances request.
Returns
If successful, the method returns zero or more CIMObjectPaths that meet the required criteria.

If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

<UL>
  <LI>CIM_ERR_ACCESS_DENIED
  <LI>CIM_ERROR_SERVER_IS_SHUTTING_DOWN
  <LI>CIM_ERR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_NAMESPACE
  <LI>CIM_ERR_INVALID_OPERATION_TIMEOUT
  <LI>CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_PARAMETER (including missing,
        duplicate, unrecognized or otherwise incorrect parameters)
  <LI>CIM_ERR_INVALID_CLASS (the CIM Class that is the
        basis for this enumeration does not exist)
  <LI>CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED
  <LI>CIM_ERR_QUERY_LANGUAGE_NOT_SUPPPORTED
  <LI>CIM_ERR_INVALID_QUERY
  <LI>CIM_ERR_FAILED (some other unspecified error occurred)</LI>
</UL>
Version
2.1.4

◆ openEnumerateInstances()

Array<CIMInstance> CIMClient::openEnumerateInstances ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
const CIMNamespaceName nameSpace,
const CIMName className,
Boolean  deepInheritance = true,
Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList(),
const String filterQueryLanguage = String::EMPTY,
const String filterQuery = String::EMPTY,
const Uint32Arg &  operationTimeout = Uint32Arg(),
Boolean  continueOnError = false,
Uint32  maxObjectCount = 0 
)

The openEnumerateInstances method opens an enumeration sequence identified by the returned enumerationContext to enumerate instances of a CIM Class in the target Namespace and optionally returns instances. This is the pull equivalent of the enumerateInstances method.

Parameters
enumerationContextCIMEnumerationContext, a return parameter that provides context for subsequent pull operations. This parameter is considered opaque to the user.
endOfSequenceBoolean parameter that the server provides to define the end of the enumeration. If this parameter is returned true, the server has determined that the enumeration is complete (has delivered all of the requested elements) and has closed the enumerationContext.
nameSpaceCIMNamespaceName The nameSpace parameter is a string that defines the target namespace. See definition of [Namespace]{DefinitionofTerms.html::NAMESPACE}.
classNameThe className input parameter defines the Class that is the basis for the enumeration.
deepInheritanceIf the deepInheritance input parameter is true, this specifies that, for each returned Instance of the Class, all properties of the Instance MUST be present (subject to constraints imposed by the other parameters), including any which were added by subclassing the specified Class. If false, each returned Instance includes only properties defined for the specified Class.

The Enumerate Instances sequence returns the same number of instances regardless of whether or not the DeepInheritance flag is set. The DeepInheritance flag is only used to determine whether or not the subclass property values should be returned.

Parameters
includeClassOriginIf the Boolean includeClassOrigin input parameter is true, this specifies that the CLASSORIGIN attribute MUST be present on all appropriate elements in each returned Instance. If false, no CLASSORIGIN attributes are present in each returned Instance.
propertyListIf the propertyList input parameter is not NULL, the members of the array define one or more CIMProperty names. Each returned Instance MUST NOT include elements for any Properties missing from this list. Note that if LocalOnly is specified as true (or DeepInheritance is specified as false) this acts as an additional filter on the set of Properties returned (for example, if CIMProperty A is included in the PropertyList but LocalOnly is set to true and A is not local to a returned Instance, then it will not be included in that Instance). If the PropertyList input parameter is an empty array this signifies that no Properties are included in each returned Instance. If the PropertyList input parameter is NULL this specifies that all Properties (subject to the conditions expressed by the other parameters) are included in each returned Instance.

If the propertyList contains duplicate elements, the Server MUST ignore the duplicates but otherwise process the request normally. If the PropertyList contains elements which are invalid CIMProperty names for any target Instance, the Server MUST ignore such entries but otherwise process the request normally.

Parameters
filterQueryLanguageIf the filterQueryLanguage* paramter is provided it defines a query language to be used with the filterQuery. This is an optional parameter and using it may cause the operation to be rejected by some CIM servers.
filterQueryString defining a filter query to be applied to the enumeration. This is an optional parameter and using it may cause the operation to be rejected by some CIM Servers.
operationTimeoutUint32Arg parameter that defines the interoperation timeout in seconds between the response and subsequent request operations of an enumeration sequence. The server shall maintain a returned enumeration context for at least the time specified by this parameter. If the parameter is set to NULL the server defines the operationTimeout time. If the user sets the parameter to a time greater than that allowed by the server, the server may use its maximum timeout time in place of the supplied parameter or refuse the request with an exception. If the client sets the timeout time to zero the server may either ignore timeout time completely or refuse the request with an exception.
continueOnErrorBoolean parameter that defines whether the server should continue to return instances subsequent to a CIMException error occurring in the server. If this parameter is "true" the server may continue processing responses subsequent to an error. If it is "false" the server must terminate the response upon the first error. This parameter is optional and not all servers accept it. A server may generate an exception response if this parameter is set "true'.
maxObjectCountUint32 parameter that defines the maximum number of elements that this Open operation can return. Any Uint32 value is legal including 0. The server may deliver up to maxObjectCount objects. The server may deliver fewer elements including possibly zero elements. In any case, the server will reset the operationTimeout when the response is generated so that maxObjectCount of zero can be used to keep an enumeration sequence open without receiving elements. This is an optional argument with default = 0.
Version
2.1.4
Returns
If successful, the method returns zero or more named Instances that meet the required criteria.

If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

<UL>
  <LI>CIM_ERR_ACCESS_DENIED
  <LI>CIM_ERROR_SERVER_IS_SHUTTING_DOWN
  <LI>CIM_ERR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_NAMESPACE
  <LI>CIM_ERR_INVALID_OPERATION_TIMEOUT
  <LI>CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_PARAMETER (including missing,
        duplicate, unrecognized or otherwise incorrect parameters)
  <LI>CIM_ERR_INVALID_CLASS (the CIM Class that is the
        basis for this enumeration does not exist)
  <LI>CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED
  <LI>CIM_ERR_QUERY_LANGUAGE_NOT_SUPPPORTED
  <LI> CIM_ERR_INVALID_QUERY
  <LI>CIM_ERR_FAILED (some other unspecified error occurred)</LI>
</UL>

◆ openQueryInstances()

Array<CIMInstance> CIMClient::openQueryInstances ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
const CIMNamespaceName nameSpace,
const String queryLanguage,
const String query,
CIMClass queryResultClass,
Boolean  returnQueryResultClass = false,
const Uint32Arg &  operationTimeout = Uint32Arg(),
Boolean  continueOnError = false,
Uint32  maxObjectCount = 0 
)

The openQueryInstances operation establishes and opens an enumeration context for an execute query operation. This is the pull parallel to the execQuery opertion. The corresponding pullInstances() method must be used to continue the sequence.

Parameters
enumerationContextSee enumerationContext parameter for openEnumerateInstances request.
endOfSequenceSee endOfSequence parameter for openEnumerateInstances request.
nameSpaceSee nameSpace parameter for openEnumerateInstances request.
filterQueryLanguageString Specifies a Query language for which the filterQuery argument is valid. This is either a CQL or WQL query It is NOT an FQL query.
filterQueryString defining a valid query in the query language defined by the filterQueryLanguage argument.
returnQueryResultClassBoolean that controls whether a class definition is returned in QueryResultClass. if false, the queryResultClass is set to CIMClass() (i.e. NULL class object) on return. Otherwise on completion the queryResultClass argument will contain a class definition that defines the properties of each instance of the query result.
continueOnError- See continueOnError parameter for openEnumerateInstances request.
maxObjectCount- See maxObjectCount parameter for openEnumerateInstances request.
Returns
Array<CIMInstance> If successful, the return contains an array of zero or more instances that satisfy the filterQuery. These instances are available only in the context of the enumeration and do not return an instance path.

If unsuccessful one of the following set of status codes will be returned:

  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_SERVER_IS_SHUTTING_DOWN
  • CIM_ERR_NOT_SUPPORTED
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_OPERATION_TIMEOUT
  • CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED
  • CIM_ERR_INVALID_PARAMETER
  • CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED
  • CIM_ERR_INVALID_QUERY
  • CIM_ERR_QUERY_FEATURE_NOT_SUPPORTED
  • CIM_ERR_FAILED
Version
2.1.4

◆ openReferenceInstancePaths()

Array<CIMObjectPath> CIMClient::openReferenceInstancePaths ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName resultClass = CIMName(),
const String role = String::EMPTY,
const String filterQueryLanguage = String::EMPTY,
const String filterQuery = String::EMPTY,
const Uint32Arg &  operationTimeout = Uint32Arg(),
Boolean  continueOnError = false,
Uint32  maxObjectCount = 0 
)

The openReferenceInstancePaths method opens an enumeration session for reference instance paths (CIMObjectPaths) to enumerate CIMObjectPaths of a CIM Class in the target Namespace and optionally returns zero or more CIMObjectPaths. NOTE: The behavior of a complete referenceInstances sequence is similar to the references operation except that it returns CIMInstances rather than CIMObjects and therefore cannot return CIMClass information.

Parameters
enumerationContextSee enumerationContext parameter for openEnumerateInstances request.
endOfSequenceSee endOfSequence parameter for openEnumerateInstances request.
nameSpaceSee nameSpace parameter for openEnumerateInstances request.
objectNameThe objectName input parameter defines the Class that is the basis for the enumeration.
assocClassCIMName input parameter that defines a filter on the associated instances set to be returned.
resultClassCIMName input parameter that defines a filter on the associated instances set to be returned.
roleString input parameter that defines a filter on the roles of associated instances to be returned
filterQueryLanguageSee filterQueryLanguage argument for openEnumerateInstances request
filterQuerySee filterQuery parameter for openEnumerateInstances request
operationTimeoutSee operationTimeout parameter for openEnumerateInstances request.
continueOnError- See continueOnError parameter for openEnumerateInstances request.
maxObjectCount- See maxObjectCount parameter for openEnumerateInstances request.
Returns
If successful, the method returns zero or more CIMObjectPaths that meet the required criteria.

If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

<UL>
  <LI>CIM_ERR_ACCESS_DENIED
  <LI>CIM_ERROR_SERVER_IS_SHUTTING_DOWN
  <LI>CIM_ERR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_NAMESPACE
  <LI>CIM_ERR_INVALID_OPERATION_TIMEOUT
  <LI>CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_PARAMETER (including missing,
        duplicate, unrecognized or otherwise incorrect parameters)
  <LI>CIM_ERR_INVALID_CLASS (the CIM Class that is the
        basis for this enumeration does not exist)
  <LI>CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED
  <LI>CIM_ERR_QUERY_LANGUAGE_NOT_SUPPPORTED
  <LI> CIM_ERR_INVALID_QUERY
  <LI>CIM_ERR_FAILED (some other unspecified error occurred)</LI>
</UL>
Version
2.1.4

◆ openReferenceInstances()

Array<CIMInstance> CIMClient::openReferenceInstances ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName resultClass = CIMName(),
const String role = String::EMPTY,
const Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList(),
const String filterQueryLanguage = String::EMPTY,
const String filterQuery = String::EMPTY,
const Uint32Arg &  operationTimeout = Uint32Arg(),
Boolean  continueOnError = false,
Uint32  maxObjectCount = 0 
)

The openReferenceInstances method opens an enumeration sequence enumeration instance paths context to enumerate reference instances with path of a CIM Class in the target Namespace and optionally returns zero or more CIMObjectPaths. NOTE: The enumeration sequence is similar to the references operation except that this returns named instances (CIMInstance) and not CIMObjects. This operation cannot retrieve reference class information.

Parameters
enumerationContextSee enumerationContext parameter for openEnumerateInstances request.
endOfSequenceSee endOfSequence parameter for openEnumerateInstances request.
nameSpaceSee nameSpace parameter for openEnumerateInstances request.
objectNameThe objectName input parameter defines the instance that is the basis for the enumeration.
resultClassCIMName input parameter that defines a filter on the reference instances set to be returned.
roleString input parameter that defines a filter on the roles of references instances to be returned
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of the returned Instance. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
propertyListSee propertyList parameter for openEnumerateInstances request.
filterQueryLanguageSee filterQueryLanguage argument for openEnumerateInstances request
filterQuerySee filterQuery parameter for openEnumerateInstances request
operationTimeoutSee operationTimeout parameter for openEnumerateInstances request.
continueOnError- See continueOnError parameter for openEnumerateInstances request.
maxObjectCount- See maxObjectCount parameter for openEnumerateInstances request.
Returns
If successful, the method returns zero or more CIMObjectPaths that meet the required criteria.

If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

<UL>
  <LI>CIM_ERR_ACCESS_DENIED
  <LI>CIM_ERROR_SERVER_IS_SHUTTING_DOWN
  <LI>CIM_ERR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_NAMESPACE
  <LI>CIM_ERR_INVALID_OPERATION_TIMEOUT
  <LI>CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED
  <LI>CIM_ERR_INVALID_PARAMETER (including missing,
        duplicate, unrecognized or otherwise incorrect parameters)
  <LI>CIM_ERR_INVALID_CLASS (the CIM Class that is the
        basis for this enumeration does not exist)
  <LI>CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED
  <LI>CIM_ERR_QUERY_LANGUAGE_NOT_SUPPPORTED
  <LI> CIM_ERR_INVALID_QUERY
  <LI>CIM_ERR_FAILED (some other unspecified error occurred)</LI>
</UL>
Version
2.1.4

◆ pullInstancePaths()

Array<CIMObjectPath> CIMClient::pullInstancePaths ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
Uint32  maxObjectCount 
)

PullInstancePaths retrieves CIMObjectPaths for an enumeration sequence opened by an openEnumerationInstancePaths, openReferenceInstancePaths, or openAssociationInstancePaths operation and represented by an enumeration context returned by the original open or previous pullInstancesPaths operation. The client must not issue a pull operation until the previous open or pull operation has been successfully completed.

Parameters
enumerationContextCIMENumeation input and output parameter. See the enumerationContext parameter for the pullInstancesWithPath operation.
endOfSequenceBoolean output parameter. See the endOfSequence parameter for the pullInstancesWithPath operation.
maxObjectCountUint32 input parameter (required) that defines the maximum number of instances that may be returned by the server. Any Uint32 integer is allowed including 0. The client may use the value zero to tell the server to keep the enumeration sequence open without retrieving any instances. Whereas this is an optional parameter for the Open... operation is is required for all of the pull... operations.
Returns
If the pullInstancesWithPath request is successful the method return contains zero or more CIMInstances (with path component).

If not successful the operation returns one of the following exceptions:

  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_SERVER_IS_SHUTTING_DOWN
  • CIM_ERR_NOT_SUPPORTED
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER
  • CIM_ERR_INVALID_ENUMERATION_CONTEXT
  • CIM_ERR)PULL_HAS_BEEN_ABANDONED
  • CIM_ERR_SERVER_LIMITS_EXCEEDED
  • CIM_ERR_FAILED
Version
2.1.4

◆ pullInstances()

Array<CIMInstance> CIMClient::pullInstances ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
Uint32  maxObjectCount 
)

The PullInstances operation retrieves instances for an open enumeration sequence opened by an openQueryInstances operation and represented by an enumeration context returned by the original open or previous pullInstances operation. The client must not issue a pull operation until the previous open or pull operation has been successfully completed.

Parameters
enumerationContextCIMEnumerationContext input/output parameter. The enumerationContext is the identifier for the enumeration sequence. Since the server may modify the enumerationContext value for each operation in the sequence, the client MUST return the enumerationContext received in the previous operation for this sequence.
endOfSequenceBoolean output parameter indicates when the enumeration sequence is complete. if endofSequence is true upon successful completion of the operation, the sequence is complete and the enumerationContext can be assumed to be invalid for any future operations. If the endOfSequence is false additional elements may be available from the server.
maxObjectCountUint32 input parameter (required) that defines the maximum number of instances that may be returned by the server. Any Uint32 integer is allowed including 0. The client may use the value zero to tell the server to keep the enumeration sequence open without retrieving any instances. Whereas this is an optional parameter for the Open... operation is is required for all of the pull... operations.
Returns
If the pullInstances request is successful the method return contains zero or more CIMInstances (with no path component).

If not successful the operation returns one of the following exceptions:

  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_SERVER_IS_SHUTTING_DOWN
  • CIM_ERR_NOT_SUPPORTED
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER
  • CIM_ERR_INVALID_ENUMERATION_CONTEXT
  • CIM_ERR_PULL_HAS_BEEN_ABANDONED
  • CIM_ERR_SERVER_LIMITS_EXCEEDED
  • CIM_ERR_FAILED
Version
2.1.4

◆ pullInstancesWithPath()

Array<CIMInstance> CIMClient::pullInstancesWithPath ( CIMEnumerationContext &  enumerationContext,
Boolean &  endOfSequence,
Uint32  maxObjectCount 
)

The PullInstancesWithPath operation retrieves instances for an open enumeration sequence opened by an openEnumerationInstances, openReferences, or openAssociationInstances operation and represented by an enumeration context returned by the original open or previous pullInstancesWithPath operation. The client must not issue a pull operation until the previous open or pull operation has been successfully completed.

Parameters
enumerationContextCIMEnumerationContext input/output parameter. The enumerationContext is the identifier for the enumeration sequence. Since the server may modify the enumerationContext value for each operation in the sequence, the client MUST return the enumerationContext received in the previous operation for this sequence.
endOfSequenceBoolean output parameter indicates when the enumeration sequence is complete. if endofSequence is true upon successful completion of the operation, the sequence is complete and the enumerationContext can be assumed to be invalid for any future operations. If the endOfSequence is false additional elements may be available from the server.
maxObjectCountUint32 input parameter (required) that defines the maximum number of instances that may be returned by the server. Any Uint32 integer is allowed including 0. The client may use the value zero to tell the server to keep the enumeration sequence open without retrieving any instances.
Returns
If the pullInstancesWithPath request is successful the method return contains zero or more CIMInstances (with path component).

If not successful the operation returns one of the following exceptions:

  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_SERVER_IS_SHUTTING_DOWN
  • CIM_ERR_NOT_SUPPORTED
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER
  • CIM_ERR_INVALID_ENUMERATION_CONTEXT
  • CIM_ERR_PULL_HAS_BEEN_ABANDONED
  • CIM_ERR_SERVER_LIMITS_EXCEEDED
  • CIM_ERR_FAILED
Version
2.1.4

◆ referenceNames()

Array<CIMObjectPath> CIMClient::referenceNames ( const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName resultClass = CIMName(),
const String role = String::EMPTY 
)

Enumerates the names of CIM Objects (Classes or Instances) which refer to a specified Object in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
objectNameA CIMObjectPath that specifies the CIM Object for which to enumerate the names of referring Objects. It may contain either a Class name or Instance name (model path).
resultClassA CIMName specifying a result filter. If not NULL, each returned name is to identify an Object which either is an Instance of this Class (or one of its subclasses) or is this Class (or one of its subclasses).
roleA String specifying a result role filter. If not the empty String, each Object for which the name is returned is to refer to the specified Object via a CIMProperty whose name matches the value of this parameter.
Returns
An Array of zero or more CIMObjectPaths containing the names of referring Classes or Instances.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ references()

Array<CIMObject> CIMClient::references ( const CIMNamespaceName nameSpace,
const CIMObjectPath objectName,
const CIMName resultClass = CIMName(),
const String role = String::EMPTY,
Boolean  includeQualifiers = false,
Boolean  includeClassOrigin = false,
const CIMPropertyList propertyList = CIMPropertyList() 
)

Enumerates CIM Association Objects (Classes or Instances) which refer to a specified Object in a target namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
objectNameA CIMObjectPath that specifies the CIM Object for which to enumerate referring Objects. It may contain either a Class name or Instance name (model path).
resultClassA CIMName specifying a result filter. If not NULL, each returned Object is to be either an Instance of this Class (or one of its subclasses) or be this Class (or one of its subclasses).
roleA String specifying a result role filter. If not the empty String, each returned Object is to refer to the specified Object via a CIMProperty whose name matches the value of this parameter.
includeQualifiers(DEPRECATED) A Boolean indicating whether the Qualifiers for each Object are to be included in the response. If false, no Qualifiers are requested. If not specified, this parameter defaults to false.
includeClassOriginA Boolean indicating whether the Class Origin attribute is to be included in elements of each returned Object. If false, no Class Origin attributes are requested. If not specified, this parameter defaults to false.
propertyListA CIMPropertyList which optionally limits the Property elements included in the returned Objects. If not NULL, the returned Objects are not to include Properties that are omitted from the list. If NULL, no specific filtering of Properties is requested. (An empty list, distinct from a NULL list, indicates that no Properties are to be included in the returned Objects.) If not specified, this parameter defaults to NULL.
Returns
An Array of zero or more CIMObjects containing the Classes or Instances that refer to the specified Object. Each returned Object contains a full Path attribute.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ registerClientOpPerformanceDataHandler()

void CIMClient::registerClientOpPerformanceDataHandler ( ClientOpPerformanceDataHandler handler)

Registers a ClientOpPerformanceDataHandler object. The specified object is called with performance data relative to each operation performed by this CIMClient object. Only one ClientOpPerformanceDataHandler can be registered at a time. A subsequent registration replaces the previous one.

Parameters
handlerThe ClientOpPerformanceDataHandler object to register.

◆ setProperty()

void CIMClient::setProperty ( const CIMNamespaceName nameSpace,
const CIMObjectPath instanceName,
const CIMName propertyName,
const CIMValue newValue = CIMValue() 
)

Sets a single Property value in a CIM Instance in a target Namespace.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
instanceNameA CIMObjectPath that identifies the CIM Instance in which to set the Property value.
propertyNameA String containing the name of the Property for which to set the value.
newValueA CIMValue containing the new Property value. If not specified, the Property is set to NULL.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ setQualifier()

void CIMClient::setQualifier ( const CIMNamespaceName nameSpace,
const CIMQualifierDecl qualifierDeclaration 
)

Adds or updates a Qualifier declaration in a target Namespace. If the Qualifier declaration already exists, it is overwritten.

Parameters
nameSpaceA CIMNamespaceName that specifies the target namespace.
qualifierDeclarationA CIMQualifierDecl object containing the Qualifier declaration to be added or updated in the namespace.
Exceptions
CIMExceptionIf the CIM Server fails to perform the requested operation. See DSP0200 for specific CIM Status Codes that may be expected.
ExceptionIf an error occurs while sending the request or receiving the response.

◆ setRequestAcceptLanguages()

void CIMClient::setRequestAcceptLanguages ( const AcceptLanguageList langs)

Configures the accept languages to be specified on subsequent requests from this client. Accept languages are the preferred languages for response data.

Parameters
langsAn AcceptLanguageList object specifying the languages preferred by this client.

◆ setRequestContentLanguages()

void CIMClient::setRequestContentLanguages ( const ContentLanguageList langs)

Configures the content languages to be specified on subsequent requests from this client. The content languages indicate the languages associated with request data sent from this client.

Parameters
langsA ContentLanguageList object specifying the languages associated with this client's request data.

◆ setTimeout()

void CIMClient::setTimeout ( Uint32  timeoutMilliseconds)

Sets the timeout value for CIMClient operations. If an operation response is not received within this timeout value, a ConnectionTimeoutException is thrown and the connection is reset. The default timeout value is 20 seconds (20000 milliseconds).

Parameters
timeoutMillisecondsAn integer specifying the timeout value (in milliseconds).

The documentation for this class was generated from the following file:
  • /root/rpmbuild/BUILD/pegasus/src/Pegasus/Client/CIMClient.h