- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 07-05-2021 05:18 AM
Create a new Discovery pattern
This lab explains how to create a serverless pattern which creates CIs that populate the Bagpipe model.
Create new discovery Serverless pattern
Navigate to Pattern Designer -> Discovery Patterns.

The Discovery Patterns page opens.

Click New.
On the Pattern Designer page, click the Basic tab and configure the following field values:
-
Pattern Type: Infrastructure
-
CI Type: Bagpipe
-
Name: Bagpipe Pattern
-
Description: Great Highland Bagpipe Discovery Pattern

In the identification section, click new and enter Discover in the Name field.

Click Done.
Click Save in the right corner of the page.
After the page refreshes, the Input Parameters tab appears.

Click the tab and and add BagpipeName in the Parameter Name field and click Done.

On the top right corner of the page, click Save and then click Publish.

In the identification section, click the Discover link to begin writing the pattern to populate CIs.

Add the related CIs into the Pattern Designer form, as follows:
Click the icon beneath the CI Attributes:

On the resulting popup, click the Select a CI Type button.
Select Drone and click the + button.

Select Drone and click the + button.

Repeat this procedure for the Whistle CI and Chanter CI; these will then appear in the related CI list.

Click Debug Mode on the pattern designer screen.

The Debug Identification Section pop-up window opens.

In the BagpipeName field, enter BagpipeDemo and click Connect.
The BagpipeName attribute appears in the Temporary Variables section:

After you connect to debug, you must populate the CI with data. For demonstration purposes, we will create "dummy" data.
On the Pattern Discovery page, paste the following XML into the Value field:
<root>
<entity>
<serial_number>bagpipe_sn</serial_number>
</entity>
</root>

Modify the step name to Get Bagpipe Raw Data and the Name field to $bagpipeRaw.

Add a new step by clicking the second steps on the steps panel:

Modify the step name to Parse Serial Number.
In the Operation field, select Parse Variable.
Drag the BagpipeRaw variable into the Enter Variable field and choose XML Parsing Strategy from the Define Parsing field.

Highlight bagpipe_sn, and in the resulting popup assign it the name sn.
Click the Table option and change the table name to sn_row_data.

Add a new step as show below and call it Populate Bagpipe CI.
Choose the transform table operation and enter sn_row_data in the source.
Drag the bagpipe CI from the right side where all your CIs are located. You need to add 2 target field names:
-
Name: Set value to $BagpipeName
-
Serial_number: Set value to $sn_row_data[].sn

Add a new step as below and call it Finalize.
Set the fields as follows:
Operation: Set Parameter Value
Value: "Final Step"
Name: "$final"

This step helps debug the previous step.
If everything was done correctly, the attributes appear on the Bagpipe CI, according to how they were defined.

In the upper upper right corner of the page, click Save and Publish.
- 6,838 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
How this pattern (or any pattern) is utilized during Discovery run.
Do we configure somewhere in the system to use the pattern? Please advise.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Interesting article. Thanks.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Srikanth30 for your question I'd suggest reviewing this ranger video:https://www.youtube.com/watch?v=U_u2UWfNiYY
it covers where to reference your patterns based on other similar patterns