As a Model Manager, I want/need virtual devices not to create assets so that we do not have assets for virtual CIs.

Lalitha7
Tera Contributor

Hi all,

As a Model Manager, I want/need virtual devices not to create assets so that we do not have assets for virtual CIs.

For the above, I have created a BR on Hardware Model table to run before Insert/Update with the conditions:

Display name contains Virtual
Model categories does not contain software

Script:

(function executeRule(current, previous /*null when async*/) {

g_form.setValue('asset_tracking_strategy', "do_not_track");

})(current, previous);

In 'Hardware Category' records there is a way to set 'Asset Tracking Strategy' to 'Don't create assets' but you never know what new model category will be created in the future to prevent new hardware categories from creating new assets for virtual machines. So, I do not want to use this method.

 

Please help!!

Regards,
Lalitha

2 REPLIES 2

Community Alums
Not applicable
I think in the Hardware model you can select the Asset tracking strategy as ' Don't Create Assets' . For your model you can select that.

Scott Halverso1
Mega Guru
Mega Guru

We utilize a fix script for admins to run periodically to catch new ones and fix the old ones.

Identify and delete all assets that are virtual devices.  At the same time update the associated model's asset tracking strategy to be "Don't create assets" to prevent future creation of CI's with this model to create assets.

 

Pseudo code

1. Query the ALM_hardware table for assets where the related CI has it's Is Virtual flag checked to true.

2. Update the associated model's asset tracking strategy

3. Delete the Asset Only (not the CI) (API in AssetUtils to do this)

 

find_real_file.png