I have put together a query to enhance inventory by adding LDoS dates and ‘approved software’. It has greatly improved our Life Cycle Mgmt. conversations. The CSV Files reside separately in a ‘standards’ folder. (there are just too many fields to keep in the same script).
The resulting output provides:
Vendor | Hostname | Model | Location | Vendor LDoS Date | HW Compliance Date | Current OS | Approved OS | Compliance to OS | Replacement Mode | And more
/**
* @intent Inventory of all devices in FN
* @description Take inventory and then cross check them against the CSV Files for SW/HW info
**/
import "Home/Network Standards/01_NetworkVars/99_Support_Detailed";
foreach device in network.devices
let platform = device.platform
let snapshotInfo = device.snapshotInfo
foreach entry in deviceSupportDetail
where entry.Model == platform.model
let LDOS = entry.HW_LDoS
let STATUS = entry.LCM
let comma = ", "
let ApprovedSW = entry.SW_N + comma + entry.SW_N1 + comma + entry.SW_N2
let Replacement = entry.HW_Replacement
let Unsupported = !matches(device.platform.osVersion,entry.SW_N)
let Current = platform.osVersion
select {
Vendor: platform.vendor,
Name: device.name,
Model: platform.model,
"Model LDoS": LDOS,
"LCM Status": STATUS,
"Current OS": Current,
"Approved OS": ApprovedSW,
"OS Compliance": (if Current == entry.SW_N
then "good"
else if Current == entry.SW_N1
then "good"
else if Current == entry.SW_N2
then "good"
else "fail"),
"Replacement Model": Replacement,
Tags: device.tagNames,
"Collection-Status": when device.snapshotInfo.result is
collectionFailed(collectionError) ->
"Collecting - " + toString(collectionError);
completed -> "Collected";
processingFailed(processingError) ->
"Processing - " + toString(processingError),
"Device Location": device.locationName,
"Management IP(s)": platform.managementIps,
}