Currently, I’m using below logic to check my configuration with above output($hba)
script logic
foreach (Configuration in OS.Configuration) { ## To parse xml attributes
foreach ($hba in $hbas) { # we have 4 instance of hba
$my = $configuration.hba | where {hba.manufacturer -match $_.Manufacturer} |where {hba.model -match $_.model} | where {hba.Driverversion -match $_.Driverversion} | | where {hba.Firmwareversion -match $_.Firmwareversion}
if ($my) { break }
}
if ($my) { break }
}
##-----------------
With above code, I was able to successfully figure out whether configuration file settings matches with output($hba) or not and show it to SA’s by displaying message that combination is not supported.
Now, I’ve new requirement where needs to display specifically the details of output component $hbas (Manufacturer,Model, Driverversion or firmwareversion) as an error that failed to match from config file.
In real case scenario, we have 10+ 1 on 1 mapping in our configuration file.
Currently, I’m using below logic to check my configuration with above output($hba)
Script logic below
foreach (Configuration in OS.Configuration) { ## To parse xml attributes
foreach ($hba in $hbas) { # we have 4 instance of hba
$my = $configuration.hba | where {hba.manufacturer -match $_.Manufacturer} |where {hba.model -match $_.model} | where {hba.Driverversion -match $_.Driverversion} | | where {hba.Firmwareversion -match $_.Firmwareversion}
if ($my) { break }
}
if ($my) { break }
}
With above code, I was able to successfully figure out whether configuration file settings matches with output($hba) or not and show it to users by displaying message that combination is not supported.
Now, I’ve new requirement where needs to display specifically the details of output component $hbas (Manufacturer,Model, Driverversion or firmwareversion) as an error that failed to match from config file.
In real case scenario, we have 10+ 1 on 1 mapping in our configuration file.