WBEMfor Solaris on Sun Developer's Guide

Working with Instances

In CIM WorkShop, you can create instances of classes. Instances inherit the characteristics of the class. You can then change the attributes of a new instance to create a unique instance of a class.

Displaying Instances

Before you create a new instance of a class, it is useful to view the instances of the class to see what properties and methods they contain.

How to Display Instances of an Existing Class
  1. In the class inheritance tree of the CIM WorkShop window, select the class for which you want to view instances.

  2. To display the Instances window:

    • Click Action->Instances.

      or

    • Click the Show Instances icon on the CIM WorkShop toolbar.

The Instances window is displayed. If the selected class has instances, the instances are displayed in the left frame of the Instances window. If the selected class does not have instances, the left frame of the Instances window is empty.

Adding Instances

Add instances to a class when you want to modify the inherited qualities of objects.

How to Add an Instance to a Class
  1. In the CIM WorkShop window:

    • Click Action->Instances.

      or

    • Right-click a class that has instances from which you can create a new instance. Click Instances in the pop-up menu.

      The Instances window is displayed. All instances of the class are displayed in the left side of the window.

  2. Right-click an instance listed in the Instances window.

    The Add Instances dialog box is displayed.

  3. To modify the inherited properties of an instance:

    1. Right-click a property listed in the Add Instances dialog box.

      A dialog box is displayed in which you can provide a value for the property. The dialog box displayed varies depending on the type of the selected property. For example, if you select a property that has a type STRING, the String dialog box will display. The Value field of this dialog box accepts only character strings.

    2. In the Values field of the dialog box, type the required value.

  4. Click OK to close the Add Instances window.

Deleting Instances

You can delete an instance that you no longer use.

How to Delete an Instance
  1. In the left frame of the CIM WorkShop window, right-click the class from which you want to delete an instance.

  2. In the pop-up menu, click Instance.

  3. In the Instance window, right-click the instance you want to delete and click Delete Instance in the pop-up menu.

    The instance is deleted.