|
In file ../../src/Pegasus/Client/CIMClient.h:
This class provides the interface that a client uses to communicate with a CIM server.
Documentation
This class provides the interface that a client uses to communicate
with a CIM server. This class constructs a CIM client on the local host
(default) or the specified host. This class invokes the CIM object
manager for this client to perform operations such as, adding, modifying,
or deleting a CIM class, CIM instance, and CIM qualifier type in a
namespace.
A client connects to a CIM Object Manager to establish an initial
connection when it needs to perform CIM operations.
This class defines the external client operations for Pegasus These
operations are based on the WBEM operations defined in the DMTF CIM
CIMOperations over HTTP operations Specification. They duplicate the names,
functions, and parameters of those CIMOperations. Each WBEM operation is a
method in this class.
The CIMClient Class includes all of the operations defined in version
1.1 Final of the DMTF CIM Operations over HTTP specification.
The CIMClient class performs the following functions:
- connection services to local host or specified host through connect
methods
- Language choice services for the connection through a set of language
selection functions.
- Execution of CIM Operations as defined in the DMTF CIM Operations over
HTTP specification using methods with almost exactly the same names and the
same parameter sets as the operations defined in that document. Note that one key
difference is that if errors occur in these operations, rather than returning an
error code, these C++ methods all return errors that occurred on the remote server
as well as any local errors through exceptions.
Exceptions and the CIMClient APIs - TBD
DOCUMENTATIONSTATUS: in process. Generally documentation in place but much reflects
the spec, not our APIs. Also exception processing needs work. KS 12 Nov 2003
Inheritance:
Public Methods
| CIMClient ()
Constructs a CIM Client object with null values (default constructor)
|
| ~CIMClient ()
Destructor for a CIM Client object
|
Uint32 | getTimeout () const
gets the current timeout value in milliseconds for the CIMClient object
|
void | setTimeout (Uint32 timeoutMilliseconds)
Sets the timeout in milliseconds for the CIMClient.
|
void | connect ( const String& host, const Uint32 portNumber, const String& userName, const String& password )
Creates an HTTP connection with the CIM server defined by the host and portNumber.
|
void | connect ( const String& host, const Uint32 portNumber, const SSLContext& sslContext, const String& userName, const String& password )
Creates an HTTP connection with the server defined by the URL address.
|
void | connectLocal ()
Creates connection to the server for Local clients.
|
void | disconnect ()
If the connection to the server was open, the connection with the server closes; otherwise, it returns.
|
void | setRequestAcceptLanguages (const AcceptLanguages& langs)
Experimental Interface Sets the accept languages that will be used on the next request.
|
AcceptLanguages | getRequestAcceptLanguages () const
Experimental Interface Gets the accept languages that will be used on the next request.
|
void | setRequestContentLanguages (const ContentLanguages& langs)
Experimental Interface Sets the content languages that will be used on the next request.
|
ContentLanguages | getRequestContentLanguages () const
Experimental Interface Gets the content languages that will be used on the next request.
|
ContentLanguages | getResponseContentLanguages () const
Experimental Interface Gets the content languages of the last response.
|
void | setRequestDefaultLanguages ()
Experimental Interface REVIEWERS: Complete this
|
CIMClass | getClass ( const CIMNamespaceName& nameSpace, const CIMName& className, Boolean localOnly = true, Boolean includeQualifiers = true, Boolean includeClassOrigin = false, const CIMPropertyList& propertyList = CIMPropertyList() )
The getClass method executes a CIM operation that returns a single CIM Class from the target Namespace where the ClassName input parameter defines the name of the class to be retrieved.
|
CIMInstance | getInstance ( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, Boolean localOnly = true, Boolean includeQualifiers = false, Boolean includeClassOrigin = false, const CIMPropertyList& propertyList = CIMPropertyList() )
Gets the CIM instance for the specified CIM object path.
|
void | deleteClass ( const CIMNamespaceName& nameSpace, const CIMName& className )
The DeleteClass method deletes a single CIM Class from the target Namespace.
|
void | deleteInstance ( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName )
The DeleteInstance operation deletes a single CIM Instance from the target Namespace.
|
void | createClass ( const CIMNamespaceName& nameSpace, const CIMClass& newClass )
The createClass method creates a single CIM Class in the target Namespace.
|
CIMObjectPath | createInstance ( const CIMNamespaceName& nameSpace, const CIMInstance& newInstance )
The createInstance method creates a single CIM Instance in the target Namespace.
|
void | modifyClass ( const CIMNamespaceName& nameSpace, const CIMClass& modifiedClass )
The modifyClass method modifies an existing CIM Class in the target Namespace.
|
void | modifyInstance ( const CIMNamespaceName& nameSpace, const CIMInstance& modifiedInstance, Boolean includeQualifiers = true, const CIMPropertyList& propertyList = CIMPropertyList() )
The modifyInstance method modifies an existing CIM Instance in the target Namespace.
|
Array<CIMClass> | enumerateClasses ( const CIMNamespaceName& nameSpace, const CIMName& className = CIMName(), Boolean deepInheritance = false, Boolean localOnly = true, Boolean includeQualifiers = true, Boolean includeClassOrigin = false )
The enumerateClasses method is used to enumerate subclasses of a CIM Class in the target Namespace.
|
Array<CIMName> | enumerateClassNames ( const CIMNamespaceName& nameSpace, const CIMName& className = CIMName(), Boolean deepInheritance = false )
The enumerateClassNames operation is used to enumerate the names of subclasses of a CIM Class in the target Namespace.
|
Array<CIMInstance> | enumerateInstances ( const CIMNamespaceName& nameSpace, const CIMName& className, Boolean deepInheritance = true, Boolean localOnly = true, Boolean includeQualifiers = false, Boolean includeClassOrigin = false, const CIMPropertyList& propertyList = CIMPropertyList() )
The enumerateInstances method enumerates instances of a CIM Class in the target Namespace.
|
Array<CIMObjectPath> | enumerateInstanceNames ( const CIMNamespaceName& nameSpace, const CIMName& className )
The enumerateInstanceNames operation enumerates the names (model paths) of the instances of a CIM Class in the target Namespace.
|
Array<CIMObject> | execQuery ( const CIMNamespaceName& nameSpace, const String& queryLanguage, const String& query )
The execQuery is used to execute a query against the target Namespace.
|
Array<CIMObject> | 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() )
The Associators method enumerates CIM Objects (Classes or Instances) that are associated to a particular source CIM Object.
|
Array<CIMObjectPath> | 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 )
The associatorNames operation enumerates the names of CIM Objects (Classes or Instances) that are associated to a particular source CIM Object.
|
Array<CIMObject> | 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() )
The references operation enumerates the association objects that refer to a particular target CIM Object (Class or Instance).
|
Array<CIMObjectPath> | referenceNames ( const CIMNamespaceName& nameSpace, const CIMObjectPath& objectName, const CIMName& resultClass = CIMName(), const String& role = String::EMPTY )
The referenceNames operation enumerates the association objects that refer to a particular target CIM Object (Class or Instance).
|
CIMValue | getProperty ( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, const CIMName& propertyName )
The getPropertyoperation is used to retrieve a single property value from a CIM Instance in the target Namespace.
|
void | setProperty ( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, const CIMName& propertyName, const CIMValue& newValue = CIMValue() )
The setProperty operation sets a single property value in a CIM Instance in the target Namespace.
|
CIMQualifierDecl | getQualifier ( const CIMNamespaceName& nameSpace, const CIMName& qualifierName )
The getQualifier operation retrieves a single CIMQualifier declaration from the target Namespace.
|
void | setQualifier ( const CIMNamespaceName& nameSpace, const CIMQualifierDecl& qualifierDeclaration )
The setQualifier creates or update a single CIMQualifier declaration in the target Namespace.
|
void | deleteQualifier ( const CIMNamespaceName& nameSpace, const CIMName& qualifierName )
The deleteQualifier operation deletes a single CIMQualifier declaration from the target Namespace.
|
Array<CIMQualifierDecl> | enumerateQualifiers ( const CIMNamespaceName& nameSpace )
The enumerateQualifiers operation is used to enumerate CIMQualifier declarations from the target Namespace.
|
CIMValue | invokeMethod ( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, const CIMName& methodName, const Array<CIMParamValue>& inParameters, Array<CIMParamValue>& outParameters )
Execute an extrinsic CIM method.
|
void | registerClientOpPerformanceDataHandler (ClientOpPerformanceDataHandler & handler)
Registers a ClientOpPerformanceDataHandler object.
|
void | deregisterClientOpPerformanceDataHandler ()
Un-Registers a client statistics ClientOpPerformanceDataHandler
|
- CIMClient()
- Constructs a CIM Client object with null values (default constructor)
- ~CIMClient()
- Destructor for a CIM Client object
- Uint32 getTimeout() const
- gets the current timeout value in milliseconds for the CIMClient object
- void setTimeout(Uint32 timeoutMilliseconds)
- Sets the timeout in milliseconds for the CIMClient.
- Parameters:
- timeoutMilliseconds - Defines the number of milliseconds the
CIMClient will wait for a response to an outstanding request. If a
request times out, the connection gets reset (disconnected and
reconnected). Default is 20 seconds (20000 milliseconds).
- void connect( const String& host, const Uint32 portNumber, const String& userName, const String& password )
- Creates an HTTP connection with the CIM server defined by the host and portNumber.
- Throws:
- AlreadyConnectedException
If a connection between the client and CIM server is already established.
InvalidLocatorException
If the specified address is improperly formed.
CannotCreateSocketException
If a socket cannot be created.
CannotConnectException
If the socket connection fails.
CIMClientConnectionException
If any other failure occurs.
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:
- host - Specifies the server as a String that the client connects to.
portNumber - Uint32 defines the port number for the server and client to use.
userName - String that defines the name of the user that the client is connecting as.
password - String that contains the password of the user the client is connecting as.
- Returns:
- The return is void. Any normal return indicates a successful connection. Any exception
indicates an error in the attempt to connect.
- void connect( const String& host, const Uint32 portNumber, const SSLContext& sslContext, const String& userName, const String& password )
- Creates an HTTP connection with the server defined by the URL address.
- Throws:
- AlreadyConnectedException
If a connection between the client and CIM server is already established.
InvalidLocatorException
If the specified address is improperly formed.
CannotCreateSocketException
If a socket cannot be created.
CannotConnectException
If the socket connection fails.
CIMClientConnectionException
If any other failure occurs.
- Parameters:
- host - Specifies the server that the client connects to. The server
is specified as a String.
portNumber - Uint32 defines the port number for the server and client to use.
sslContext - Specifies the SSL context to use for this connection.
userName - String that defines the name of the user that
the client is connecting as.
password - String containing the password of the user
the client is connecting as.
- void connectLocal()
- Creates connection to the server for
Local clients. The connectLocal connects to the CIM server
running on the local system in the default location. The
connection is automatically authenticated for the current
user.
@See connect - The exceptions are defined in connect.
- void disconnect()
- If the connection to the server was open, the connection with the server closes;
otherwise, it returns. Before opening a new connection, clients should
use this method to close the open connection.
- void setRequestAcceptLanguages(const AcceptLanguages& langs)
- Experimental Interface
Sets the accept languages that will be used on the next request.
Accept languages are the preferred languages that are to be
returned on the response to the next request.
- Parameters:
- langs - - REVIEWERS: Complete this
- AcceptLanguages getRequestAcceptLanguages() const
- Experimental Interface
Gets the accept languages that will be used on the next request.
Accept languages are the preferred languages that are to be
returned on the response to the next request.
- void setRequestContentLanguages(const ContentLanguages& langs)
- Experimental Interface
Sets the content languages that will be used on the next request.
These content languages are the languages of the CIM objects that will
sent on the next request.
- Parameters:
- langs - REVIEWERS: Complete this
- ContentLanguages getRequestContentLanguages() const
- Experimental Interface
Gets the content languages that will be used on the next request.
These content languages are the languages of the CIM objects that will
sent on the next request.
- ContentLanguages getResponseContentLanguages() const
- Experimental Interface
Gets the content languages of the last response.
These content languages are the languages of the CIM objects, or
CIM exceptions, that were returned on the last response..
- void setRequestDefaultLanguages()
- Experimental Interface
REVIEWERS: Complete this
- CIMClass getClass( const CIMNamespaceName& nameSpace, const CIMName& className, Boolean localOnly = true, Boolean includeQualifiers = true, Boolean includeClassOrigin = false, const CIMPropertyList& propertyList = CIMPropertyList() )
- The getClass method executes a CIM operation that returns
a single CIM Class from the target Namespace where the ClassName input
parameter defines the name of the class to be retrieved.
- Throws:
- s REVIEWERS: Need to complete this definition
... Connect sequence.
CIMNamespace("root/cimv2);
Boolean localOnly = true;
Boolean includQualifiers = true;
Boolean includeClassOrigin = false;
CIMPropertyList propertyList; empty property list
try
CIMException checkClassException;
{
CIMClass cimClass = client.getClass(nameSpace,
className,
localOnly,
includeQualifiers,
includeClassOrigin,
propertyList);
}
catch(CIMException& e)
{
if (checkClassException.getCode() = CIM_ERR_NOT_FOUND)
cout << "Class " << className << " not found." << endl;
...
}
catch(Exception& e)
{
}
...
An alternate call with the default parameters would be:
This uses the defaults localOnly = includeQualifiers = true
includeClassOrigin = false. propertyList = Null;
CIMClass cimClass = client.getClass(nameSpace, className);
REVIEWERS: Complete this
- Parameters:
- nameSpace - (Required) The nameSpace parameter is a CIMName
object that defines the target Namespace. See definition of
Namespace.
className - (Required)The className input parameter is a CIMName
object that defines the name of the Class to be retrieved.
localOnly - (Boolean, Optional, default = true, Input) If the localOnly input
parameter is true, this specifies that only CIM Elements (properties,
methods and qualifiers) overridden within the definition of the Class are
returned. If false, all elements are returned. This parameter therefore
effects a CIM Server-side mechanism to filter certain elements of the
returned object based on whether or not they have been propagated from the
parent Class (as defined by the PROPAGATED attribute).
includeQualifiers - (Boolean, Optional, default = true, Input) If the
includeQualifiers input parameter is true, this specifies that
all Qualifiers for that Class (including Qualifiers on the Class and on
any returned Properties, Methods or CIMMethod Parameters) MUST be included
as elements in the response. If false no QUALIFIER elements are present
in the returned Class object.
includeClassOrigin - (Boolean,Optional, default = false, Input) If
the includeClassOrigin input parameter is true, this specifies
that the CLASSORIGIN attribute MUST be present on all appropriate elements
in the returned Class. If false, no CLASSORIGIN attributes are present in
the returned Class.
propertyList - (optional, Input) If the propertyList
CIMPropertyList input parameter is not NULL, the members of the array
define one or more CIMProperty names. The returned Class WILL NOT include
elements for any Properties missing from this list. Note that if
LocalOnly is specified as true 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 the
requested Class, then it will not be included in the response). If the
PropertyList input parameter is an empty array this signifies that no
Properties are included in the response. If the PropertyList input
parameter is NULL this specifies that all Properties (subject to the
conditions expressed by the other parameters) are included in the
response.
- Returns:
- If successful, the return value is a single CIMClass objcet.
If unsuccessful, an exception is executed. If the error is local, this may
be any local exception.
If the error is in the host normally a CIMException is returned with one of the
following CIMException codes, 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 is given
in parentheses.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate,unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the request CIM Class does not exist in
the specified namespace)
- CIM_ERR_FAILED (some other unspecified error occurred)
- See Also:
- CIMPropertyList
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 the target Class, the Server MUST ignore such entries but
otherwise process the request normally.
CIMExcetpion
- CIMInstance getInstance( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, Boolean localOnly = true, Boolean includeQualifiers = false, Boolean includeClassOrigin = false, const CIMPropertyList& propertyList = CIMPropertyList() )
- Gets the CIM instance for the specified CIM object path.
- Parameters:
- nameSpace - (Required) The nameSpace parameter is a CIMName
object that defines the target Namespace. See definition of
Namespace.
instanceName - CIMobjectpath that identifies this CIM instance.
This must include all of the keys.
localOnly - If true, only properties and qualifiers overridden
or defined in the returned Instance are included in the response.
If false, all elements of the returned Instance are returned.
includeQualifiers - If true, all Qualifiers for each Object
(including Qualifiers on the Object and on any returned Properties)
MUST be included. If false no Qualifiers are present in the returned Object.
includeClassOrigin - If true, CLASSORIGIN attribute MUST be
present on all appropriate elements in each returned Object. If false,
no CLASSORIGIN attributes are present in each returned Object. The CLASSORIGIN
attribute is defined in the DMTF's Specification for the Representation of CIM
in XML. CLASSORIGIN is an XML tag identifying the following text as a class name.
It is attached to a property or method (when specified in XML), to indicate the
class where that property or method is first defined. Where the same property
name is locally defined in another superclass or subclass, the Server will
return the value for the property in the lowest subclass.
propertyList - If the PropertyList input parameter is not NULL, the
members of the array define one or more Property names. Each returned Object
MUST NOT include elements for any Properties missing from this list.
Note that if LocalOnly is specified as true this acts as an additional
filter on the set of Properties returned (for example, if Property 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 Object. 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 Object. If the PropertyList contains duplicate elements, the
Server ignores the duplicates but otherwise process the request normally.
If the PropertyList contains elements which are invalid Property names for
any target Object, the Server ignores such entries but otherwise process
the request normally.
- Returns:
- If successful, the CIM instance identified by the CIMObjectPath. If
unsuccessful, an exception is executed.
REVIEWERS: COmplete this.
- void deleteClass( const CIMNamespaceName& nameSpace, const CIMName& className )
- The DeleteClass method deletes a single CIM Class from the
target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a CIMName that defines
the target namespace. See defintion of
Namespace.
className - The className input parameter defines the name
of the Class to be deleted.
- Returns:
- If successful, the specified Class (including any subclasses
and any instances) MUST have been removed by the CIM Server. The
operation MUST fail if any one of these objects cannot be deleted.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class to be deleted does not exist)
- CIM_ERR_CLASS_HAS_CHILDREN (the CIM Class has one or more
subclasses which cannot be deleted)
- CIM_ERR_CLASS_HAS_INSTANCES (the CIM Class has one or more
instances which cannot be deleted)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void deleteInstance( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName )
- The DeleteInstance operation deletes a single CIM Instance
from the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines
the target namespace. See defintion of
Namespace.
instanceName - The instanceName input parameter defines
the name (model path) of the Instance to be deleted.
- Returns:
- If successful, the specified Instance MUST have been removed
by the CIM Server.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the
specified namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested
CIM Instance does not exist in the specified namespace)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void createClass( const CIMNamespaceName& nameSpace, const CIMClass& newClass )
- The createClass method creates a single CIM Class in
the target Namespace. The Class MUST NOT already exist. The NewClass input
parameter defines the new Class. The proposed definition MUST be a correct
Class definition according to the CIM specification.
In processing the creation of the new Class, the following rules MUST be
conformed to by the CIM Server:
Any CLASSORIGIN and PROPAGATED attributes in the NewClass MUST be ignored by
the Server. If the new Class has no Superclass, the NewClass parameter
defines a new base Class. The Server MUST ensure that all Properties and
Methods of the new Class have a CLASSORIGIN attribute whose value is the
name of the new Class. If the new Class has a Superclass, the NewClass
parameter defines a new Subclass of that Superclass. The Superclass MUST
exist. The Server MUST ensure that:
- Any Properties, Methods or Qualifiers in the Subclass not defined in
the Superclass are created as new elements of the Subclass. In
particular the Server MUST set the CLASSORIGIN attribute on the new
Properties and Methods to the name of the Subclass, and ensure that all
other Properties and Methods preserve their CLASSORIGIN attribute value
from that defined in the Superclass
If a CIMProperty is defined in the Superclass and in the Subclass, the
value assigned to that property in the Subclass (including NULL) becomes
the default value of the property for the Subclass. If a CIMProperty or
CIMMethod of the Superclass is not specified in the Subclass, then that
CIMProperty or CIMMethod is inherited without modification by the
Subclass
- Any Qualifiers defined in the Superclass with a TOSUBCLASS attribute
value of true MUST appear in the resulting Subclass. Qualifiers in the
Superclass with a TOSUBCLASS attribute value of false MUST NOT be
propagated to the Subclass . Any CIMQualifier propagated from the
Superclass cannot be modified in the Subclass if the OVERRIDABLE
attribute of that CIMQualifier was set to false in the Superclass. It is
a
Client error to specify such a CIMQualifier in the NewClass with a
different definition to that in the Superclass (where definition
encompasses the name, type and flavor attribute settings of the
element, and the value of the CIMQualifier).
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
newClass - The newClass input parameter defines the new Class.
- Returns:
- If successful, the specified Class MUST have been created by the CIM
Server.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Class already exists)
- CIM_ERR_INVALID_SUPERCLASS (the putative CIM Class declares a
non-existent superclass)
- CIM_ERR_FAILED (some other unspecified error occurred)
- CIMObjectPath createInstance( const CIMNamespaceName& nameSpace, const CIMInstance& newInstance )
- The createInstance method creates a single CIM
Instance in the target Namespace. The Instance MUST NOT already exist.
In processing the creation of the new Instance, the following rules MUST be
conformed to by the CIM Server:
Any CLASSORIGIN and PROPAGATED attributes in the NewInstance MUST be ignored
by the Server.
The Server MUST ensure that:
- Any Qualifiers in the Instance not defined in the Class are created
as new elements of the Instance.
- All Properties of the Instance preserve their CLASSORIGIN attribute
value from that defined in the Class.
- If a CIMProperty is specified in the ModifiedInstance parameter, the
value assigned to that property in the Instance (including NULL) becomes
the value of the property for the Instance. Note that it is a Client
error to specify a CIMProperty that does not belong to the Class.
- If a CIMProperty of the Class is not specified in the Instance, then
that CIMProperty is inherited without modification by the Instance.
- Any Qualifiers defined in the Class with a TOINSTANCE attribute
value of true appear in the Instance. Qualifiers in the
Class with a TOINSTANCE attribute value of false MUST NOT be propagated
to the Instance.
- Any CIMQualifier propagated from the Class cannot be modified in the
Instance if the OVERRIDABLE attribute of that CIMQualifier was set to
false
in the Class. It is a Client error to specify such a CIMQualifier in the
NewInstance with a different definition to that in the Class (where
definition encompasses the name, type and flavor attribute settings of
the element, and the value of the CIMQualifier).
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
newInstance - The newInstance input parameter defines the new
Instance. The proposed definition MUST be a correct Instance definition for
the underlying CIM Class according to the CIM specification.
- Returns:
- If successful, the return value defines the object path of the new
CIM Instance relative to the target Namespace (i.e. the Model Path as
defined by the CIM specification), created by the CIM Server. It is
returned in case one or more of the new keys of the Instance are allocated
dynamically during the creation process rather than specified in the
request.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class of which this is to be a new
Instance does not exist)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void modifyClass( const CIMNamespaceName& nameSpace, const CIMClass& modifiedClass )
- The modifyClass method modifies an existing CIM Class in the
target Namespace.
The Class MUST already exist. The ModifiedClass
input parameter defines the set of changes (which MUST be correct
amendments to the CIM Class as defined by the CIM Specification) to be made
to the current class definition.
In processing the modifcation of the Class, the following rules MUST be
conformed to by the CIM Server.
- Any CLASSORIGIN and PROPAGATED attributes in the
ModifiedClass MUST be ignored by the Server.
- If the modified Class has no Superclass,
theModifiedClass parameter defines modifications to a base Class.
The Server MUST ensure that:
- All Properties and Methods of the modified Class have a
CLASSORIGIN attribute whose value is the name of this Class.
- Any Properties, Methods or Qualifiers in the existing Class
definition which do not appear in the ModifiedClass parameter are removed from the resulting
modified Class.
- If the modified Class has a Superclass,the ModifiedClass
parameter defines modifications to a Subclass of that Superclass. The
Superclass MUST exist, and the Client MUST NOT change the name of the
Superclass in the modified Subclass. The Server MUST ensure that:
- Any Properties, Methods or Qualifiers in the Subclass not
defined in the Superclass are created as elements of the Subclass. In
particular the Server MUST set the CLASSORIGIN attribute on the
new Properties and Methods to the name of the Subclass, and MUST ensure
that all other Properties and Methods preserve their
CLASSORIGIN attribute value from that defined in the
Superclass.
- Any CIMProperty, CIMMethod or CIMQualifier previously defined in the
Subclass
but not defined in the Superclass, and which is not present in the
ModifiedClass parameter, is removed from the Subclass.
- If a CIMProperty is specified in the ModifiedClass
parameter, the value assigned to that property therein (including
NULL) becomes the default value of the property for the Subclass.
- If a CIMProperty or CIMMethod of the Superclass is not specified in
the
Subclass, then that CIMProperty or CIMMethod is inherited
without modification by the Subclass (so that any previous changes to
such an Element in the Subclass are lost).
- If a CIMQualifier in the Superclass is not specified in the
Subclass, and the CIMQualifier is defined in the Superclass with a
TOSUBCLASS attribute value of true, then the
CIMQualifier
MUST still be present in the resulting modified Subclass (it is not
possible to remove a propagated CIMQualifier from a Subclass).
- Any CIMQualifier propagated from the Superclass cannot be
modified in the Subclass if the OVERRIDABLE attribute of
that CIMQualifier was set to false in the Superclass. It is a
Client error to specify such a CIMQualifier in the
ModifiedClass
with a different definition to that in the Superclass (where definition
encompasses the name, type and flavor attribute settings of the
<QUALIFIER> element, and the value of the CIMQualifier).
- Any Qualifiers defined in the Superclass with a TOSUBCLASS
attribute value of false MUST NOT be propagated to the
Subclass.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
modifiedClass - The modifiedClass
input parameter defines the set of changes (which MUST be correct
amendments to the CIM Class as defined by the CIM Specification) to be made
to the current class definition.
- Returns:
- If successful, the specified Class MUST have been updated by
the CIM Server.
The request to modify the Class MUST fail if the Server cannot update any
existing Subclasses or Instances of that Class in a consistent manner.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does not
exist)
- CIM_ERR_INVALID_SUPERCLASS (the putative CIM Class
declares a non-existent or incorrect superclass)
- CIM_ERR_CLASS_HAS_CHILDREN (the modification could
not be performed because it was not possible to update the subclasses of
the Class in a consistent fashion)
- CIM_ERR_CLASS_HAS_INSTANCES (the modification could
not be performed because it was not possible to update
the instances of the Class in a consistent fashion)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void modifyInstance( const CIMNamespaceName& nameSpace, const CIMInstance& modifiedInstance, Boolean includeQualifiers = true, const CIMPropertyList& propertyList = CIMPropertyList() )
- The modifyInstance method modifies an existing CIM
Instance in the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
modifiedInstance - The modifiedInstance input parameter
identifies the name of the Instance to be modified, and defines the set of
changes (which MUST be correct amendments to the Instance as
defined by the CIM Specification) to be made to the current Instance
definition.
In processing the modifcation of the Instance, the following rules MUST
be conformed to by the CIM Server:
- Any CLASSORIGIN and PROPAGATED attributes in the
ModifiedInstance MUST be ignored by the Server.
- The Class MUST exist, and the Client MUST NOT change
the name of the Class in the modified Instance. The Server MUST ensure
that:
- Any Qualifiers in the Instance not defined in
the Class are created as new elements of the Instance.
- All Properties of the Instance preserve their
CLASSORIGIN attribute value from that defined in the Class.
- Any CIMQualifier previously defined in the Instance but not
defined in the Class, and which is not present in the
ModifiedInstance parameter, is removed from the Instance.
- If a CIMProperty is specified in the ModifiedInstance
parameter, the value assigned to that property therein
(including NULL) becomes the value of the property for the Instance.
Note that it is a Client error to specify a CIMProperty that does not
belong to the Class.
- If a CIMProperty of the Class is not specified in the Instance,
then that CIMProperty is inherited without modification by the Instance
(so that any previous changes to that CIMProperty in the Instance are
lost).
- Any Qualifiers defined in the Class with a TOINSTANCE
attribute value of true appear in the Instance (it is not
possible remove a propagated CIMQualifier from an Instance. Qualifiers
in the Class with a TOINSTANCE attribute value of false
MUST NOT be propagated to the Instance.
- Any CIMQualifier propagated from the Class cannot be modified by the
Server if the OVERRIDABLE attribute of that CIMQualifier was
set to false in the Class. It is a Client error to specify such
a CIMQualifier in the ModifiedInstance with a different
definition to that in the Class (where definition encompasses the name,
type and flavor attribute settings of the
<QUALIFIER> element, and the value of the CIMQualifier).
- Any CIMQualifier propagated from the Class cannot be modified in
the Instance if the OVERRIDABLE attribute of that CIMQualifier
was
set to false in the Class. It is a Client error to specify such
a CIMQualifier in the ModifiedInstance with a different
definition
to that in the Class (where definition encompasses the name, type and
flavor attribute settings of the <QUALIFIER>
element, and the value of the CIMQualifier).
- Returns:
- If successful, the specified Instance MUST have been updated by the
CIM Server.
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
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class of which this is
to be a new Instance does not exist)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist)
- CIM_ERR_FAILED (some other unspecified error occurred)
- Array<CIMClass> enumerateClasses( const CIMNamespaceName& nameSpace, const CIMName& className = CIMName(), Boolean deepInheritance = false, Boolean localOnly = true, Boolean includeQualifiers = true, Boolean includeClassOrigin = false )
- The enumerateClasses method is used to enumerate subclasses of
a CIM Class in the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
className - The className input parameter defines the Class
that is the basis for the enumeration.
deepInheritance - If the deepInheritance input
parameter is true, this specifies that all subclasses of
the specified Class should be returned (if the ClassName input
parameter is absent, this implies that all Classes in the target Namespace
should be returned). If false, only immediate child
subclasses are returned (if the ClassName input parameter is
NULL, this implies that all base Classes in the target Namespace should be
returned).
localOnly - If the localOnly input parameter is
true, it specifies that, for each returned Class, only elements
(properties, methods and qualifiers) overriden within the definition of
that Class are included. If false, all elements are
returned. This parameter therefore effects a CIM Server-side mechanism
to filter certain elements of the returned object based on whether or not
they have been propagated from the parent Class (as defined by the
PROPAGATED attribute).
includeQualifiers - If the includeQualifiers input parameter
is true, this specifies that all Qualifiers for each Class
(including Qualifiers on the Class and on any returned Properties, Methods
or CIMMethod Parameters) MUST be included as <QUALIFIER>
elements in the response. If false no <QUALIFIER> elements
are present in each returned Class.
includeClassOrigin - If the IncludeClassOrigin input
parameter is true, this specifies that the CLASSORIGIN
attribute MUST be present on all appropriate elements in each returned
Class. If false, no CLASSORIGIN attributes are present in each
returned Class.
- Returns:
- If successful, the method returns zero or more Classes 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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class that is the
basis for this enumeration does not exist)
- CIM_ERR_FAILED (some other unspecified error occurred)
- Array<CIMName> enumerateClassNames( const CIMNamespaceName& nameSpace, const CIMName& className = CIMName(), Boolean deepInheritance = false )
- The enumerateClassNames operation is used to enumerate the
names of subclasses of a CIM Class in the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
className - The className input parameter defines the Class
that is the basis for the enumeration.
deepInheritance - If the deepInheritance input parameter is
true, this specifies that the names of all subclasses of the specified Class
should be returned (if the ClassName input parameter is absent, this implies
that the names of all Classes in the target Namespace should be returned).
If false, only the names of immediate child subclasses are returned (if the
className input parameter is NULL, this implies that the names of all base
Classes in the target Namespace should be returned). @return If successful,
the method returns zero or more names of Classes that meet the requested
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.
- Array<CIMInstance> enumerateInstances( const CIMNamespaceName& nameSpace, const CIMName& className, Boolean deepInheritance = true, Boolean localOnly = true, Boolean includeQualifiers = false, Boolean includeClassOrigin = false, const CIMPropertyList& propertyList = CIMPropertyList() )
- The enumerateInstances method enumerates instances of a CIM
Class in the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
className - The className input parameter defines the
Class that is the basis for the enumeration.
localOnly - If the localOnly input parameter is
true, this specifies that, for each returned Instance,
only elements (properties and qualifiers) overriden within the
definition of that Instance are included. If false,
all elements are returned. This parameter therefore effects a CIM
Server-side mechanism to filter certain elements of the returned object
based on whether or not they have been propagated from the parent
Class (as defined by the PROPAGATED attribute).
Only elements (properties, methods and qualifiers) defined or
overridden within the class are included in the response. Propagated
properties are not included because their values are based on another class
information. If not specified, all elements of the class definition are
returned. Note: When instances are returned, the InstanceName must include
all keys, including propagated keys. Therefore, these attributes are
included in the name part of the method response, but not in the value
information.
deepInheritance - If 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 operation 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.
includeQualifiersIf - the includeQualifiers input
parameter is true, this specifies that all Qualifiers
for each Instance (including Qualifiers on the Instance
and on any returned Properties) MUST be included as
<QUALIFIER> elements in the response. If false no
<QUALIFIER> elements are present in each
returned Instance.
includeClassOrigin - If the 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.
propertyList - If 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.
- 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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class that is the
basis for this enumeration does not exist)
- CIM_ERR_FAILED (some other unspecified erroroccurred)
- Array<CIMObjectPath> enumerateInstanceNames( const CIMNamespaceName& nameSpace, const CIMName& className )
- The enumerateInstanceNames operation enumerates the
names (model paths) of the instances of a CIM Class in the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
className - The className input parameter defines the Class
that is the basis for the enumeration.
- Returns:
- If successful, the method returns zero or more names of Instances
(model paths) that meet the requsted 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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class that is the
basis for this enumeration does not exist)
- CIM_ERR_FAILED (some other unspecified error occurred)
- Array<CIMObject> execQuery( const CIMNamespaceName& nameSpace, const String& queryLanguage, const String& query )
- The execQuery is used to execute a query against the target
Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
queryLanguage - The queryLanguage String input parameter
defines the query language in which the Query parameter is expressed.
query - The query input parameter defines the query to be
executed.
- Returns:
- If successful, the method returns zero or more CIM Classes or
Instances that correspond to the results set of the query.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED (the requested query language is
not recognized)
- CIM_ERR_INVALID_QUERY (the query is not a valid query in the
specified query language)
- CIM_ERR_FAILED (some other unspecified error ccurred)
- Array<CIMObject> 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() )
- The Associators method enumerates CIM Objects
(Classes or Instances) that are associated to a particular source CIM
Object.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
objectName - The objectName input parameter defines the source
CIM Object whose associated Objects are to be returned. This may be either
a Class name or Instance name (model path).
assocClass - The assocClass input parameter, if not NULL, MUST
be a valid CIM Association Class name. It acts as a filter on the returned
set of Objects by mandating that each returned Object MUST be associated to
the source Object via an Instance of this Class or one of its subclasses.
resultClass - The resultClass input parameter, if not NULL,
MUST be a valid CIM Class name. It acts as a filter on the returned set of
Objects by mandating that each returned Object MUST be either an Instance of
this Class (or one of its subclasses) or be this Class (or one of its
subclasses).
role - The role input parameter, if not NULL, MUST be a valid
CIMProperty name. It acts as a filter on the returned set of Objects by
mandating that each returned Object MUST be associated to the source Object
via an Association in which the source Object plays the specified role (i.e.
the name of the CIMProperty in the Association Class that refers to the
source object MUST match the value of this parameter).
resultRole - The resultRole input parameter, if not NULL, MUST
be a valid CIMProperty name. It acts as a filter on the returned set of
Objects by mandating that each returned Object MUST be associated to the
source Object via an Association in which the returned Object plays the
specified role (i.e. the name of the CIMProperty in the Association Class
that refers to the returned Object MUST match the value of this parameter).
includeQualifiers - If the includeQualifiers input parameter
is true, this specifies that all Qualifiers for each Object (including
Qualifiers on the Object and on any returned Properties) MUST be included as
elements in the response. If false no elements are
present in each returned Object.
includeClassOrigin - If the includeClassOrigin input parameter
is true, this specifies that the CLASSORIGIN attribute MUST be present on
all appropriate elements in each returned Object. If false, no CLASSORIGIN
attributes are present in each returned Object.
propertyList - If the propertyList input parameter is not
NULL, the members of the array define one or more CIMProperty names. Each
returned Object 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 Object. 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
Object.
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 Object,
the Server MUST ignore such entries but otherwise process the request
normally.
Clients SHOULD NOT explicitly specify properties in the PropertyList
parameter unless they have specified a non-NULL value for the ResultClass
parameter.
- Returns:
- If successful, the method returns zero or more CIM Classes or
Instances meeting the requested criteria. Since it is possible for CIM
Objects from different hosts or namespaces to be associated, each returned
Object includes location information.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including
missing,duplicate, unrecognized or
otherwise incorrect parameters)
- CIM_ERR_FAILED (some other unspecified error occurred)
- Array<CIMObjectPath> 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 )
- The associatorNames operation enumerates the names of
CIM Objects (Classes or Instances) that are associated to a particular
source CIM Object.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
objectName - The objectName input parameter defines the source
CIM Object whose associated names are to be returned. This is either a Class
name or Instance name (model path).
assocClass - The assocClass input parameter, if not NULL,
MUST be a valid CIM Association Class name. It acts as a filter on the
returned set of names by mandating that each returned name identifies an
Object that MUST be associated to the source Object via an Instance of this
Class or one of its subclasses.
resultClass - The resultClass input parameter, if not NULL,
MUST be a valid CIM Class name. It acts as a filter on the returned set of
names by mandating that each returned name identifies an Object that MUST be
either an Instance of this Class (or one of its subclasses) or be this Class
(or one of its subclasses).
role - The role input parameter, if not NULL, MUST be a valid
CIMProperty name. It acts as a filter on the returned set of names by
mandating that each returned name identifies an Object that MUST be
associated to the source Object via an Association in which the source
Object plays the specified role (i.e. the name of the CIMProperty in the
Association Class that refers to the source Object MUST match the value of
this parameter).
resultRole - The resultRole input parameter, if not
NULL, MUST be a valid CIMProperty name. It acts as a filter on the
returned set of names by mandating that each returned name identifies an
Object that MUST be associated to the source Object via an Association in
which the named returned Object plays the specified role (i.e. the name of
the CIMProperty in the Association Class that refers to the returned Object
MUST match the value of this parameter).
- Returns:
- If successful, the method returns zero or more full CIM Class paths
or Instance paths of Objects meeting the requested criteria. Since it is
possible for CIM Objects from different hosts or namespaces to be
associated, each returned path is an absolute path that includes host and
namespace information.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE;
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_FAILED (some other unspecified error occurred)
- Array<CIMObject> 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() )
- The references operation enumerates the association
objects that refer to a particular target CIM Object (Class or Instance).
- Parameters:
- The - NameSpace parameter is a string that defines the target
namespace NAMESPACE
nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
objectName - The objectName input parameter defines the target
CIM Object whose referring Objects are to be returned. This is either a
Class name or Instance name (model path).
resultClass - The resultClass input parameter, if not NULL,
MUST be a valid CIM Class name. It acts as a filter on the returned set of
Objects by mandating that each returned Object MUST be an Instance of this
Class (or one of its subclasses), or this Class (or one of its subclasses).
role - The role input parameter, if not NULL, MUST be a valid
CIMProperty name. It acts as a filter on the returned set of Objects by
mandating that each returned Objects MUST refer to the target Object via a
CIMProperty whose name matches the value of this parameter.
includeQualifiers. - If the includeQualifiers input parameter
is true, this specifies that all Qualifiers for each Object (including
Qualifiers on the Object and on any returned Properties) MUST be included as
elements in the response. If false no elements are
present in each returned Object.
includeClassOrigin - If the includeClassOrigin input parameter
is true, this specifies that the CLASSORIGIN attribute MUST be present on
all appropriate elements in each returned Object. If false, no CLASSORIGIN
attributes are present in each returned Object.
propertyList - If the propertyList input parameter is not
NULL, the members of the array define one or more CIMProperty names. Each
returned Object 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 Object. 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
Object.
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 Object,
the Server MUST ignore such entries but otherwise process the request
normally.
Clients SHOULD NOT explicitly specify properties in the PropertyList
parameter unless they have specified a non-NULL value for the ResultClass
parameter.
- Returns:
- If successful, the method returns zero or more CIM Classes or
Instances meeting the requested criteria. Since it is possible for CIM
Objects from different hosts or namespaces to be associated, each returned
Object includes location information.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_FAILED (some other unspecified error occurred)
- Array<CIMObjectPath> referenceNames( const CIMNamespaceName& nameSpace, const CIMObjectPath& objectName, const CIMName& resultClass = CIMName(), const String& role = String::EMPTY )
- The referenceNames operation enumerates the association
objects that refer to a particular target CIM Object (Class or Instance).
- Parameters:
- The - NameSpace parameter is a string that defines the target
namespace NAMESPACE
nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
objectName - The objectName input parameter defines the target
CIM Object whose referring object names are to be returned. It may be either
a Class name or an Instance name (model path).
resultClass - The resultClass input parameter, if not NULL,
MUST be a valid CIM Class name. It acts as a filter on the returned set of
Object Names by mandating that each returned Object CIMName MUST identify an
Instance of this Class (or one of its subclasses), or this Class (or one of
its subclasses).
role - The role input parameter, if not NULL, MUST be a valid
CIMProperty name. It acts as a filter on the returned set of Object Names by
mandating that each returned Object CIMName MUST identify an Object that
refers to the target Instance via a CIMProperty whose name matches the value
of this parameter.
- Returns:
- If successful,the method returns the names of zero or more full CIM
Class paths or Instance paths of Objects meeting the requested criteria.
Since it is possible for CIM Objects from different hosts or namespaces to
be associated, each returned path is an absolute path that includes host and
namespace information.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_FAILED (some other unspecified error occurred)
- CIMValue getProperty( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, const CIMName& propertyName )
-
The getPropertyoperation is used to retrieve a single property
value from a CIM Instance in the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
instanceName - The instanceName input parameter specifies the
name of the Instance (model path) from which the CIMProperty value is
requested. \INSTANCENAME
propertyName - The propertyName input parameter specifies the
name of the CIMProperty whose value is to be returned.
- Returns:
- If successful, the return value specifies the value of the requested
CIMProperty. If the value is NULL then no element is returned.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
- CIM_ERR_NO_SUCH_PROPERTY (the CIM Instance does exist, but the
requested CIMProperty does not)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void setProperty( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, const CIMName& propertyName, const CIMValue& newValue = CIMValue() )
- The setProperty operation sets a single property value in a CIM
Instance in the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
instanceName - The instanceName input parameter specifies the
name of the Instance (model path) for which the CIMProperty value is to be
updated.
propertyName - The propertyName input parameter specifies the
name of the CIMProperty whose value is to be updated.
newValue - The NewValue input parameter specifies the new value for the
CIMProperty (which may be NULL).
- Returns:
- 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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including
missing,duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested
CIM Instance does not exist in the specified namespace)
- CIM_ERR_NO_SUCH_PROPERTY (the CIM Instance does exist, but the
requested CIMProperty does not)
- CIM_ERR_FAILED (some other unspecified error occurred)
- CIMQualifierDecl getQualifier( const CIMNamespaceName& nameSpace, const CIMName& qualifierName )
- The getQualifier operation retrieves a single CIMQualifier
declaration from the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a CIMNameSpace object that defines
the target namespace. See defintion of
Namespace.
qualifierName - The qualifierName input parameter is a CIMName object
that identifies the CIMQualifier whose declaration to be retrieved.
- Returns:
- If successful, the method returns the CIMQualifier declaration for
the named CIMQualifier.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested
CIM Instance does not exist in the specified namespace)
- CIM_ERR_NO_SUCH_PROPERTY (the CIM Instance does exist, but the
requested CIMProperty does not)
- CIM_ERR_TYPE_MISMATCH (the supplied value is incompatible with the
type of the CIMProperty)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void setQualifier( const CIMNamespaceName& nameSpace, const CIMQualifierDecl& qualifierDeclaration )
- The setQualifier creates or update a single CIMQualifier
declaration in the target Namespace. If the CIMQualifier declaration
already exists it is overwritten.
- Throws:
- CIMException - Any of the CIMException codes defined above may
be returned.
@Exception Exception - TBD
... Connect with CIMClient object client;
CIMNamespaceName nameSpace("root/cimv2");
CIMQualifierDecl qual1(
CIMName ("CIMTYPE"),
String(),
CIMScope::PROPERTY,
CIMFlavor::TOINSTANCE);
try
{
client.setQualifier(nameSpace, qual1);
}
catch(CIMException e)
{
...
}
- Parameters:
- nameSpace - The nameSpace parameter is a CIMName that defines the target
namespace. See defintion of
Namespace.
- CIMQualifierDecl The CIMQualifierDecl input parameter is a
CIMQualifier object that defines the CIMQualifier Declaration to be added to
the Namespace.
- Returns:
- If successful, the CIMQualifier declaration MUST have been added to
the target Namespace. If a CIMQualifier declaration with the same
CIMQualifier name already existed, then it MUST have been replaced by the
new declaration.
If unsuccessful, a CIMException with 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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the requested CIMQualifier declaration did not
exist)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void deleteQualifier( const CIMNamespaceName& nameSpace, const CIMName& qualifierName )
- The deleteQualifier operation deletes a single CIMQualifier
declaration from the target Namespace.
- Throws:
- CIMexception - May return any of the CIMException codes defined above.
Exception
simple function to delete qualifier named "Expensive". Exceptions ignored.
CIMClient client;
client.connect("localhost", 5988, String::EMPTY, String::EMPTY);
CIMName qualifierName("Expensive");
client.deleteQualifier(CIMName("root/cimv2",qualifierName);
- Parameters:
- nameSpace - The nameSpace parameter is a CIMName that defines the target
namespace. See defintion of
Namespace.
qualifierName - CIMName qualifierName input parameter identifies
the CIMQualifier whose declaration to be deleted.
- Returns:
- If successful, the specified CIMQualifier declaration MUST have been deleted
from the Namespace with a normal return from the call.
If there is any error one of the CIMException errors is returned. The
errors are based on the CIM error codes defined below:
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or
otherwise incorrect parameters)
- CIM_ERR_FAILED (some other unspecified error occurred)
- Array<CIMQualifierDecl> enumerateQualifiers( const CIMNamespaceName& nameSpace )
- The enumerateQualifiers operation is used to enumerate
CIMQualifier declarations from the target Namespace.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
- Returns:
- If successful, the method returns zero or more CIMQualifier
declarations.
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.
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing,
duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the requested CIMQualifier declaration did not
exist)
- CIM_ERR_FAILED (some other unspecified error occurred)
function to get all qualifer declarations and print xml form.
try
{
CIMClient client;
client.connect("localhost", 5988, String::EMPTY, String::EMPTY);
Array qualifierDecls;
CIMNamespaceName nameSpace("root/cimv2");
qualifierDecls = client.enumerateQualifiers(nameSpace);
}
catch(Exception& e)
{
PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl);
exit(1);
}
for (Uint32 i = 0; i < qualifierDecls.size(); i++)
{
XmlWriter::printQualifierDeclElement(qualifierDecls[i], cout);
}
- CIMValue invokeMethod( const CIMNamespaceName& nameSpace, const CIMObjectPath& instanceName, const CIMName& methodName, const Array<CIMParamValue>& inParameters, Array<CIMParamValue>& outParameters )
- Execute an extrinsic CIM method.
Any CIM Server is assumed to support extrinsic methods. Extrinsic methods
are defined by the Schema supported by the Cim Server. If a CIM Server does
not support extrinsic method invocations, it MUST (subject to the
considerations described in the rest of this section) return the error code
CIM_ERR_NOT_SUPPORTED to any request to execute an extrinsic method. This
allows a CIM client to determine that all attempts to execute extrinsic
methods will fail.
- Parameters:
- nameSpace - The nameSpace parameter is a string that defines the target
namespace. See defintion of
Namespace.
instanceName - The instanceName parameter is a CIMReference
that defines the CIM instance for which the method is defined
methodName - The methodName parameter is a String with the
name of the method to be executed.
inParameters - This parameter defines an array of input parameters for
the method execution
outParameters - This parameter defines an array of parameters returned
by the executed method
- Returns:
- If the Cim Server is unable to perform the extrinsic method
invocation, one of the following status codes MUST be returned by the
CimServer, 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 specific interpretation of the error is given in parentheses.
ATTN: We have not defined the CIMValue returned
- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED (the CimServer does not support extrinsic
method invocations)
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not exist
in the specified namespace)
- CIM_ERR_METHOD_NOT_FOUND
- CIM_ERR_METHOD_NOT_AVAILABLE (the CimServer is unable to honor the
invocation request)
- CIM_ERR_FAILED (some other unspecified error occurred)
- void registerClientOpPerformanceDataHandler(ClientOpPerformanceDataHandler & handler)
- Registers a ClientOpPerformanceDataHandler object. Only one Handler can be registered
at a time. A subsequent registration replaces a previous one.
- Parameters:
- handler - The ClientOpPerformanceDataHandler object instance being registered.
- void deregisterClientOpPerformanceDataHandler()
- Un-Registers a client statistics ClientOpPerformanceDataHandler
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
|