Repository navigation
CMDB: report hardware assets whose CI status does not match the asset-CI mapping - #2676
Open
itam-automation wants to merge 2 commits into
Open
itam-automation wants to merge 2 commits into
itam-automation wants to merge 2 commits into
Conversation
Drift does not only come from setWorkflow(false). The example output included test assets of my own, and Hardware Status is a second pair of status fields on hardware CIs, not a feature of newer releases.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description:
A read-only background script that compares the status of each hardware asset with the status of its CI, using the platform's own mapping table
alm_asset_ci_state_mappinginstead of hard-coded values. It groups all assets in one GlideAggregate query (grouped byci.install_status), so it stays fast on large tables, and lists every mismatch with a count and sample asset tags.Asset and CI drift apart in practice, for example when an integration writes the CI status and no mapping row syncs it back, or when imports and fix scripts run with
setWorkflow(false). On a PDI (Brazil) with the demo data and 197 test assets of my own, the script found 120 mismatches out of 1091 assets. The output is in the README. It checksinstall_statusonly, not Hardware Status.Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Documentation
Restrictions