Providers get information about the system and fulfill other
requests on behalf of client applications. Clients deal with instances
of the classes of objects defined by CIM. An instance is a representation
of a single manageable entity (such as a disk); it contains data
obtained from the system by a provider. Providers perform the conversion
between CIM and the platform's commands, services and data formats.
CIM is the object-based representation that a WBEM client application understands.
The interface between the server/CIM Server infrastructure
and the plug-in providers is called the Provider Application Programming Interface
(API). The CIM Server calls a function of the Provider API when
it needs to have a provider perform an operation requested by a client.
The provider API functions are documented in the HP WBEM Services
SDK in the /opt/wbem/html directory. Information and guidelines for designing and
implementing a provider are described in the section on Chapter 4 “Provider Implementation”.
Providers are written in C++ and are compiled and linked to
create a shared library. A single shared library may contain one
or more providers.
The following diagram shows the relationship among clients,
the CIM Server, providers, and the underlying system features.
Two types of providers are currently supported by HP WBEM
Services for HP-UX: Instance and Method.
The instance provider allows manipulation of instances of classes,
and of properties of those instances. The method provider allows
clients to invoke extrinsic methods on instances. A single provider
can be both a method and a instance provider, and can serve more
than one class of object.
Instance providers must contain code for the following six
functions (although a minimum implementation for a function can
simply throw a NotSupported exception):
createInstance: creates a new instance of a class of object
getInstance: returns a single instance of a class
enumerateInstances: returns all the instances of a class
enumerateInstanceNames: returns the names of all instances of a class (see the
section on “Key
Values: Uniquely Specifying an Instance” for information
about instance names)
modifyInstance: replaces the values of specific properties of an instance
deleteInstance: deletes a specified instance
Method providers implement just one function: invokeMethod. This function tells the provider to execute an extrinsic
method on a specified instance.
Implementing a provider for HP WBEM Services for HP-UX consists
of delivering the following three components:
Definitions of the class or classes
of objects (schema) that represent the system resources to be managed.
(See Chapter 3, “Schema Design ”)
A shared library containing code that implements
the functions of the chosen provider interface: instance and/or
method (See Chapter 4, Chapter 4 “Provider Implementation”.)
Registration of the provider to inform the CIM Server
of its correspondence with the defined schema. (See “Provider
Registration and Naming” later in this
chapter.)
These steps will be discussed in the sections that follow.