As a Model Manager, I want/need virtual devices not to create assets so that we do not have assets for virtual CIs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2022 12:09 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2022 09:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2022 04:02 PM
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)