Snippet Guides

New Instance Group Discovery

Before you begin: Before creating a new discovery you need to decide on a discovery ID and a display name. You should also think about what properties you should discover for the class.

For more information, consult the Management Pack Content document, section Workflow/Element naming.

Discovery naming

If the project is not open in Visual Studio, open it.
Find the folder for the class that you want to discover.

Add new item
Right-click the folder and choose Add\New Item....
In the list, select Empty Management Pack Fragment.

Enter fragment name
Enter a name for the fragment. This should be the same the folder with the addition of Discovery. So if the folder name is ApplicationServersGroup the new fragment should be named ApplicationServersGroupDiscovery. Click Add. The fragment is created and opened.

Choose snippet
Right-click between the <ManagementPackFragment> tags and select Insert snippet. Choose MPDevToolkit\Discoveries\Group. Depending on how many different classes that should be populated into this group, select the corresponding snippet.

The snippet is inserted.

Enter MPID
Enter the MPID and press tab. Enter the description part of the group name. This should be the same name as the fragment where the group was defined. Press tab.

Enter Class ID
Enter the description part of the class ID (MPID is already filled in). The objects of this class will be be populated into the group. Press tab.
Repeat this for each class that is used to popluate the group.

Press enter to stop editing the snippet.
Check the display strings of the discovery, Display Name and Description, to see that they look correct.

The discovery is now done. Save the file/project.

Version: 1.0
Created: 2016-06-12, 20:56