Share via


Operations Manager Management Pack Authoring - Viewing Classes in the Consoles

This document is part of the Operations Manager Management Pack Authoring Center.

The following procedures illustrate the concepts of base classes and inheritance by using the Logical Disk classes in the Windows Server Operating System Management Pack. The first procedure inspects the definition of classes and relationships by using the Authoring console. The second uses the Operations console to view the same classes in actual operation.


Operations Console

Note:
The term class is not shown in the Operations console but is instead known as a target. When you are working in the Authoring console and Visual Studio Authoring Extensions, the term class is used. Each term in its relative context refers to the same concept.

To view a class definition in the Operations console:

  1. Start the Operations console.

  2. In the Navigation pane, select Monitoring, and then select Discovered Inventory.

  3. In the Actions pane, select Change Target Type. In the Select Items to Target dialog box, select View all targets.

    Be aware that this list, which consists of all the classes included in all the management packs currently installed in the management group. Any of these classes may be selected to view a list of all its discovered instances and their properties. Any new classes included in a management pack that is installed later in the management group will be included in this list.

  4. Select Windows Server 2008 Logical Disk, and then click OK.

    Notice that this is the same class as inspected in the previous procedure in the Authoring console. Windows Server 2008 Logical Disk is the Display Name that is used in the Operations console, whereas Microsoft.Windows.Server.2008.LogicalDisk is the Name or ID of the class that must be unique. The view shows a listing of all instances of logical disk on Windows Server 2008 computers that were discovered in the current environment.

  5. Select one of the instances.

    Take note of the properties in the Detail View pane. These are the same properties that are seen in the previous procedure viewing the definition of the class. The current view shows the values for each property that were collected by the discovery process. Notice also the Path name property that is built from the key property of the current class and its parent(s). In this case, the key properties include the computer name and the device name.

  6. In the Actions pane, again select Change Target Type.

  7. In the Select Items to Target dialog box, select View all targets.

  8. Select Logical Disk (Server), and then click OK.

    This is the Microsoft.Windows.Server.LogicalDisk class that is the base class for Microsoft.Windows.Server.2008.LogicalDisk. The view resembles the previous one, but will include objects from both Windows Server 2003 and Windows Server 2008 (assuming both are installed in the environment). The properties are identical to the previous view, because the Windows Server Logical Disk class has the same properties that are inherited by Windows Server 2008 Logical Disk.

  9. In the Actions pane, again select Change Target Type. In the Select Items to Target dialog box, select View all targets.

  10. Select Logical Disk, and then click OK.

    This is the Microsoft.Windows.LogicalDisk class that is the base class for Microsoft.Windows.Server.LogicalDisk. The instances are identical to the previous view, but fewer properties are shown. This is because the Microsoft.Windows.Server.LogicalDisk class has only the properties directly assigned to it, and inherits only its single property from System.Entity. The other properties are not visible because they are associated with a class further down the tree.


Authoring Console

To view a class definition in the Authoring console:

  1. Start the Authoring console.

  2. Open the file Microsoft.Windows.Server.2008.Discovery.mp.

  3. In the Navigation pane, select Service Model, and then select Classes.

  4. In the Classes pane, right-click Microsoft.Windows.Server.2008.LogicalDisk, and select Properties.

  5. On the General tab, note in the Base Class text box that base class of the selected class is Microsoft.Windows.Server.LogicalDisk. This matches the diagram shown in Classes and Relationships. You could open Microsoft.Windows.Server.Library.mp that holds that class, and verify that its base class is System.Database, as shown in the diagram.

  6. Click the Properties tab. Note the multiple properties on the current class that were inherited from Microsoft.Windows.Server.LogicalDisk, Microsoft.Windows.Server.LogicalDevice, and System.Entity. This shows the inheritance of properties by a class from its base class.

  7. Click the Relationships tab. Note the relationships that the class is involved in. Of special note is the hosting relationship from Microsoft.Windows.ComputerHostsLogicalDevice in the Target section. This is the hosting relationship that the class inherits from its base class and matches the diagram in Classes and Relationships.


Visual Studio Authoring Extensions

To view a class definition using Visual Studio Authoring Extensions:

For VSAE, we will create a new project and add references to the management pack libraries that contain the classes we want to view. 

  1. Start Visual Studio.

  2. Select File, then New, and then Project.

  3. In the Installed Templates pane select Operations Manager.

  4. In the right pane, select Operations Manager Core Monitoring Management Pack and then click OK.

  5. In the Solution Explorer, right click References and click Add Reference.

  6. Select the Browse tab and locate Microsoft.Windows.Server.2008.Discovery.mp. Click OK.

  7. Repeat step 6 for Microsoft.Windows.Server.Library,mp.

  8. Select View and then Management Pack Browser.

  9. In the Management Pack Browser pane, expand Microsoft.Windows.Server.2008.Discovery and Service Model, and then select Classes.

  10. In the right pane, select Microsoft.Windows.Server.2008.LogicalDisk.  Note that the base class listed is WindowsServer!Microsoft.Windows.Server.LogicalDisk.

  11. In the Management Pack Browser pane, expand Microsoft.Windows.Server.Library and Service Model, and then select Classes.

  12. In the right pane, select Microsoft.Windows.Server.LogicalDisk.  Note the detailed definition of the class and its properties in the bottom pane.