To customize a device/interface/module property, for instance, add the Image File field as a device property for all Cisco IOS switches as follows, you must add the property in GDR.
To automatically assign a value for the property by running a Qapp, complete the following steps:
1.Click the icon from the taskbar and select New Qapp from the drop-down menu to open the Qapp Editor.
2.In the Start node, leave the Define Qapp Device Input option as it is and click the icon to extend the Canvas node.
3.Double-click the Canvas node, keep the default settings for the Device Queue node.
4.In the Device Queue node, keep the default settings.
5.Extend a Device(this) node from the Device Queue node, and keep the default options.
6.Extend a CLI node from the this node.
7.In the this node, enter the show version command in the Command field, and select show version (Cisco IOS Switch,Cisco Router) from the drop-down menu.
8.Extend a Table node from the CLI Command node, click the icon, select the variable system_image_file and click the
button to add it to the Table1 node.
9.Extend a Basic Output node from the Table node. In the Output node, you can set conditions to trigger the defined output. You can also use the default condition "True", which means "if the image file exists".
10. Extend a Device Property action node from the Output1 node.
11. Define the Device Property1 node as follows:
1)Click Add in the Device Property pane, and assetTag is displayed in the Property column.
2)Point to the assetTag item and select Image File (the property name you have defined in the GDR) from the drop-down menu.
3)Point to the first row of the variable column and select $system_image_file from the drop-down menu.
12. Save and run the Qapp on a map with Cisco IOS switches included. Once the Qapp execution is finished, double-click a device to view whether the Image_file field is populated in the Device Details pane.
See also:
▪Specifying Property Value in Device Details Pane