| United States-English |
|
|
|
![]() |
HP WBEM Services Software Developer's Kit for HP-UX Provider and Client Developer's Guide > Chapter 5 Client ImplementationClient Development Use Cases |
|
By way of example, several use cases are described below. These use cases illustrate issues that WBEM client developers may encounter in designing and implementing their applications. A general description and recommended best practices are included with each use case. Some clients only need general system information describing the platform and its running operating system. This general information is often available in particular subclasses of CIM_System, each of which probably has just a single instance. Examples include the CIM_ComputerSystem (or CIM_UnitaryComputerSystem) and CIM_OperatingSystem classes. The classes which represent general system information may have only single instances. Further, those instances may have many properties which are relatively static, i.e. there may need to be a significant (and probably infrequent) event such as a system reboot or the changing a host name before certain properties on the instance will change. These classes may contain key properties that are propagated to other classes. In addition, some providers may implement special subclasses with additional properties or methods. It may be helpful to the user of the client application to have a mechanism to access these platform or provider specific properties and methods. Consider obtaining the system information upon first client contact with a target platform. If the information is relatively static, it is more efficient to avoid repeatedly obtaining the same information. If the client application displays properties of CIM objects to the user, consider supporting a mechanism whereby users can view additional properties supplied in the subclasses. It may be helpful to enumerate the subclasses of the class of interest using the enumerateClasses operation to see if this case exists. If so, the class can be accessed using the enumerateInstance operation with the DeepInheritance flag set to TRUE. In addition, it may be useful to support some general mechanism for the user to invoke methods specific to subclasses. Some clients may need to retrieve dynamic information. For example, process information (CIM_Process) is dynamic since processes are frequently created and terminated. Client applications may need to update the list of instances between retrievals of the information when instances may be deleted or created dynamically. Some special-purpose clients have prior knowledge about a platform based on some simple facts. This may include the value of some special property, the existence of a special-purpose namespace, or the existence of some special-purpose subclasses. An example of this is a platform partition management client that uses a special namespace containing partition-related classes to manage the platform. Frequently, clients of this type may be released in conjunction with an applicable provider or providers. Clients may be able to simplify their discovery processing to identify that the appropriate namespace and schema elements are present on the target platform. Also, it may be useful to check the version of the provider to ensure that it can support the client requests. Command line clients can be implemented to make underlying WBEM instrumentation transparent to the end user. WBEM clients can be implemented to replace existing CLIs. Because WBEM is based on HTTP, it is possible to implement command line clients that access remote hosts. In such cases, a remote host name will probably be a part of the command line or otherwise furnished to the client. It is important to consider the security model of the command line client. If the client is on the same host as the CIM Server, the local connection mechanism can be used. However, if the CLI permits a user to access a remote platform, a username and password will need to be supplied for the remote CIM Server to authenticate. If the command accesses a CIM Server on a remote host, include a command line argument to specify the host to be accessed (managed). Command lines may include the ability to specify a user. However, it is inadvisable to include a command line argument for the password since this argument can show up as plan text in the argument list. Prompting the user for the password or using some authentication brokering scheme are better approaches. |
||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||