Dell Chassis Storage Health Cook Down UMT

Dell.Chassis.Storage.HealthCookDownUMT (UnitMonitorType)

Dell Chassis Storage Health Cook Down Unit Monitor Template

Element properties:

RunAsDefault
AccessibilityPublic
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
PBP DataSource Dell.Operations.CMC.TemplateMethod.ChassisStorageHealthDSMT Default
OperationStatusError ConditionDetection System.ExpressionFilter Default
OperationStatusSuccess ConditionDetection System.ExpressionFilter Default
OperationStatusWarning ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Interval SecondsInterval Seconds
LogLevelint$Config/LogLevel$Log LevelLog Level

Source Code:

<UnitMonitorType ID="Dell.Chassis.Storage.HealthCookDownUMT" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="Success" NoDetection="false"/>
<MonitorTypeState ID="Warning" NoDetection="false"/>
<MonitorTypeState ID="Error" NoDetection="false"/>
</MonitorTypeStates>
<Configuration>
<xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer"/>
<xsd:element minOccurs="1" name="LogLevel" type="xsd:integer"/>
<xsd:element name="InstanceIndex" type="xsd:string"/>
<xsd:element name="RemoteAccessIP" type="xsd:string"/>
<xsd:element name="RemoteConfig" type="xsd:string"/>
<xsd:element name="LogDirectory" type="xsd:string"/>
<xsd:element name="LogFileName" type="xsd:string"/>
<xsd:element name="ComponentType" type="xsd:string"/>
<xsd:element name="Username" type="xsd:string"/>
<xsd:element name="Password" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="LogLevel" Selector="$Config/LogLevel$" ParameterType="int"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource ID="PBP" TypeID="DOL!Dell.Operations.CMC.TemplateMethod.ChassisStorageHealthDSMT">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<LogLevel>$Config/LogLevel$</LogLevel>
<RemoteAccessIP>$Config/RemoteAccessIP$</RemoteAccessIP>
<RemoteConfig>$Config/RemoteConfig$</RemoteConfig>
<LogDirectory>$Config/LogDirectory$</LogDirectory>
<LogFileName>$Config/LogFileName$</LogFileName>
<Username>$Config/Username$</Username>
<Password>$Config/Password$</Password>
<TemplateScriptConfiguration>
Dim protParameterObj
Set protParameterObj = New ProtocolInfo
Call protParameterObj.setProtocolName("wsman")
Dim racadmParameterObj
Set racadmParameterObj = New ProtocolInfo
Call racadmParameterObj.setProtocolName("racadm")
If DebugScript = False Then
Call protParameterObj.setProtocolParameterDictionary("IPAddress", remoteIp)
Call protParameterObj.setProtocolParameterDictionary("Port", Trim(remoteConfigArray(0)))
Call protParameterObj.setProtocolParameterDictionary("Encoding", Trim(remoteConfigArray(1)))
Call protParameterObj.setProtocolParameterDictionary("SkipCACheck", Trim(remoteConfigArray(2)) )
Call protParameterObj.setProtocolParameterDictionary("SkipCNCheck", Trim(remoteConfigArray(3)) )
Call protParameterObj.setProtocolParameterDictionary("SkipRevocationCheck", Trim(remoteConfigArray(4)) )
Call protParameterObj.setProtocolParameterDictionary("Authentication", Trim(remoteConfigArray(5)))
Call protParameterObj.setProtocolParameterDictionary("Timeout", Trim(remoteConfigArray(6)))
Call protParameterObj.setProtocolParameterDictionary("UserName", "$RunAs[Name='DAD!Dell.CMC.RemoteAccount']/UserName$")
Call protParameterObj.setProtocolParameterDictionary("Password", "$RunAs[Name='DAD!Dell.CMC.RemoteAccount']/Password$")

Call racadmParameterObj.setProtocolParameterDictionary("IPAddress", remoteIp)
Call racadmParameterObj.setProtocolParameterDictionary("Port", Trim(remoteConfigArray(0)))
Call racadmParameterObj.setProtocolParameterDictionary("UserName", "$RunAs[Name='DAD!Dell.CMC.RemoteAccount']/UserName$")
Call racadmParameterObj.setProtocolParameterDictionary("Password", "$RunAs[Name='DAD!Dell.CMC.RemoteAccount']/Password$")

Else
Call protParameterObj.setProtocolParameterDictionary("IPAddress", "10.94.168.57")
Call protParameterObj.setProtocolParameterDictionary("Port", "443")
Call protParameterObj.setProtocolParameterDictionary("Encoding", "UTF-8")
Call protParameterObj.setProtocolParameterDictionary("SkipCACheck", "True")
Call protParameterObj.setProtocolParameterDictionary("SkipCNCheck", "True")
Call protParameterObj.setProtocolParameterDictionary("SkipRevocationCheck", "True")
Call protParameterObj.setProtocolParameterDictionary("Timeout", "300")
Call protParameterObj.setProtocolParameterDictionary("UserName", "")
Call protParameterObj.setProtocolParameterDictionary("Password", "")
End If
'#################################################################################################################################
</TemplateScriptConfiguration>
<ProfileDictionaryScript>
'#################################################################################################################################
'**************************************************************************************************
'ProfileDictionaryCreator code
'**************************************************************************************************
Dim profileInfoDict
Set profileInfoDict = CreateObject("Scripting.Dictionary")

Public Function PopulateCMCProfileDictionary
'Chassis Controller
Dim Dell_Chassis_CMC_racadm_Obj
Set Dell_Chassis_CMC_racadm_Obj = New ProfileInformation
Dell_Chassis_CMC_racadm_Obj.setProfileName("Dell.Chassis.cmc.racadm")

Dim Dell_Chassis_CMC_racadm_FQDD
Set Dell_Chassis_CMC_racadm_FQDD = New AttributeProperty
Dell_Chassis_CMC_racadm_FQDD.setProtocol("racadm")
Dell_Chassis_CMC_racadm_FQDD.setClassName("getmodinfo")
Dell_Chassis_CMC_racadm_FQDD.setProtocolAttributeName("&lt;module&gt;")
Dell_Chassis_CMC_racadm_FQDD.setSearchKey("cmc")
Dell_Chassis_CMC_racadm_Obj.setAttributePropertyObject(Dell_Chassis_CMC_racadm_FQDD)
Dell_Chassis_CMC_racadm_Obj.setAttributeDictionary("FQDD")

Dim Dell_Chassis_CMC_racadm_Health
Set Dell_Chassis_CMC_racadm_Health = New AttributeProperty
Dell_Chassis_CMC_racadm_Health.setProtocol("racadm")
Dell_Chassis_CMC_racadm_Health.setClassName("getmodinfo")
Dell_Chassis_CMC_racadm_Health.setProtocolAttributeName("&lt;health&gt;")
Dell_Chassis_CMC_racadm_Health.setSearchKey("cmc")
Dell_Chassis_CMC_racadm_Obj.setAttributePropertyObject(Dell_Chassis_CMC_racadm_Health)
Dell_Chassis_CMC_racadm_Obj.setAttributeDictionary("health")

Dim Dell_Chassis_CMC_racadm_PowerState
Set Dell_Chassis_CMC_racadm_PowerState = New AttributeProperty
Dell_Chassis_CMC_racadm_PowerState.setProtocol("racadm")
Dell_Chassis_CMC_racadm_PowerState.setClassName("getmodinfo")
Dell_Chassis_CMC_racadm_PowerState.setProtocolAttributeName("&lt;pwrState&gt;")
Dell_Chassis_CMC_racadm_PowerState.setSearchKey("cmc")
Dell_Chassis_CMC_racadm_Obj.setAttributePropertyObject(Dell_Chassis_CMC_racadm_PowerState)
Dell_Chassis_CMC_racadm_Obj.setAttributeDictionary("PowerState")

Dim Dell_Chassis_CMC_racadm_ChassisServiceTag
Set Dell_Chassis_CMC_racadm_ChassisServiceTag = New AttributeProperty
Dell_Chassis_CMC_racadm_ChassisServiceTag.setProtocol("racadm")
Dell_Chassis_CMC_racadm_ChassisServiceTag.setClassName("getmodinfo")
Dell_Chassis_CMC_racadm_ChassisServiceTag.setProtocolAttributeName("&lt;svcTag&gt;")
Dell_Chassis_CMC_racadm_ChassisServiceTag.setSearchKey("cmc")
Dell_Chassis_CMC_racadm_Obj.setAttributePropertyObject(Dell_Chassis_CMC_racadm_ChassisServiceTag)
Dell_Chassis_CMC_racadm_Obj.setAttributeDictionary("ChassisServiceTag")

Dell_Chassis_CMC_racadm_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.cmc.racadm",Dell_Chassis_CMC_racadm_Obj
End Function

Public Function PopulateWsmanCMCServiceTagProfileDictionary
'CMC
Dim CMC_CMCGroup_ServiceTag_Obj
Set CMC_CMCGroup_ServiceTag_Obj = New ProfileInformation
CMC_CMCGroup_ServiceTag_Obj.setProfileName("CMC.ServiceTag")

Dim CMC_CMCGroup_ServiceTag
Set CMC_CMCGroup_ServiceTag = New AttributeProperty
CMC_CMCGroup_ServiceTag.setProtocol("wsman")
CMC_CMCGroup_ServiceTag.setClassName("cimv2/DCIM_ModularChassisView")
CMC_CMCGroup_ServiceTag.setProtocolAttributeName("ServiceTag")
CMC_CMCGroup_ServiceTag_Obj.setAttributePropertyObject(CMC_CMCGroup_ServiceTag)
CMC_CMCGroup_ServiceTag_Obj.setAttributeDictionary("ServiceTag")

CMC_CMCGroup_ServiceTag_Obj.populateProfileClassNameList()
profileInfoDict.Add "CMC.ServiceTag",CMC_CMCGroup_ServiceTag_Obj

End Function

Public Function PopulateIOProfileDictionary
'IO Module
Dim Dell_Chassis_IOModule_racadm_Obj
Set Dell_Chassis_IOModule_racadm_Obj = New ProfileInformation
Dell_Chassis_IOModule_racadm_Obj.setProfileName("Dell.Chassis.IO.Racadm")

Dim Dell_Chassis_IOModule_racadm_FQDD
Set Dell_Chassis_IOModule_racadm_FQDD = New AttributeProperty
Dell_Chassis_IOModule_racadm_FQDD.setProtocol("racadm")
Dell_Chassis_IOModule_racadm_FQDD.setClassName("getmodinfo")
Dell_Chassis_IOModule_racadm_FQDD.setProtocolAttributeName("&lt;module&gt;")
Dell_Chassis_IOModule_racadm_FQDD.setSearchKey("switch")
Dell_Chassis_IOModule_racadm_Obj.setAttributePropertyObject(Dell_Chassis_IOModule_racadm_FQDD)
Dell_Chassis_IOModule_racadm_Obj.setAttributeDictionary("FQDD")

Dim Dell_Chassis_IOModule_racadm_Health
Set Dell_Chassis_IOModule_racadm_Health = New AttributeProperty
Dell_Chassis_IOModule_racadm_Health.setProtocol("racadm")
Dell_Chassis_IOModule_racadm_Health.setClassName("getmodinfo")
Dell_Chassis_IOModule_racadm_Health.setProtocolAttributeName("&lt;health&gt;")
Dell_Chassis_IOModule_racadm_Health.setSearchKey("switch")
Dell_Chassis_IOModule_racadm_Obj.setAttributePropertyObject(Dell_Chassis_IOModule_racadm_Health)
Dell_Chassis_IOModule_racadm_Obj.setAttributeDictionary("health")


Dell_Chassis_IOModule_racadm_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.IO.Racadm",Dell_Chassis_IOModule_racadm_Obj
End Function

'This function will create WSMAN dictinary to get Device IDs for IO Module Instances
'This function will be called only when RACADM is not present on the system
Public Function PopulateWsmanIOProfileDictionary
'IO Module
Dim CMC_IOModule_Obj
Set CMC_IOModule_Obj = New ProfileInformation
CMC_IOModule_Obj.setProfileName("Dell.Chassis.IO.Racadm")

Dim CMC_IOModule_FQDD
Set CMC_IOModule_FQDD = New AttributeProperty
CMC_IOModule_FQDD.setProtocol("wsman")
CMC_IOModule_FQDD.setClassName("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_PassThroughModule")
CMC_IOModule_FQDD.setProtocolAttributeName("DeviceID")
CMC_IOModule_Obj.setAttributePropertyObject(CMC_IOModule_FQDD)
CMC_IOModule_Obj.setAttributeDictionary("FQDD")

CMC_IOModule_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.IO.Racadm",CMC_IOModule_Obj

End Function

Public Function PopulateFanProfileDictionary
'Fan
Dim Dell_Chassis_Fan_Obj
Set Dell_Chassis_Fan_Obj = New ProfileInformation
Dell_Chassis_Fan_Obj.setProfileName("Dell.Chassis.Fan")

Dim Dell_Chassis_Fan_FQDD
Set Dell_Chassis_Fan_FQDD = New AttributeProperty
Dell_Chassis_Fan_FQDD.setProtocol("wsman")
Dell_Chassis_Fan_FQDD.setClassName("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_Fan")
Dell_Chassis_Fan_FQDD.setProtocolAttributeName("DeviceID")
Dell_Chassis_Fan_Obj.setAttributePropertyObject(Dell_Chassis_Fan_FQDD)
Dell_Chassis_Fan_Obj.setAttributeDictionary("FQDD")

Dim Dell_Chassis_Fan_RollupStatus
Set Dell_Chassis_Fan_RollupStatus = New AttributeProperty
Dell_Chassis_Fan_RollupStatus.setProtocol("wsman")
Dell_Chassis_Fan_RollupStatus.setClassName("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_Fan")
Dell_Chassis_Fan_Obj.setAttributePropertyObject(Dell_Chassis_Fan_RollupStatus)
Dell_Chassis_Fan_Obj.setAttributeDictionary("HealthState")

Dell_Chassis_Fan_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.Fan",Dell_Chassis_Fan_Obj
End Function

Public Function PopulatePowerSupplyProfileDictionary
'PowerSupply
Dim Dell_Chassis_PowerSupply_Obj
Set Dell_Chassis_PowerSupply_Obj = New ProfileInformation
Dell_Chassis_PowerSupply_Obj.setProfileName("Dell.Chassis.PowerSupply")

Dim Dell_Chassis_PowerSupply_FQDD
Set Dell_Chassis_PowerSupply_FQDD = New AttributeProperty
Dell_Chassis_PowerSupply_FQDD.setProtocol("wsman")
Dell_Chassis_PowerSupply_FQDD.setClassName("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_PowerSupply")
Dell_Chassis_PowerSupply_FQDD.setProtocolAttributeName("DeviceID")
Dell_Chassis_PowerSupply_Obj.setAttributePropertyObject(Dell_Chassis_PowerSupply_FQDD)
Dell_Chassis_PowerSupply_Obj.setAttributeDictionary("FQDD")

Dim Dell_Chassis_PowerSupply_RollupStatus
Set Dell_Chassis_PowerSupply_RollupStatus = New AttributeProperty
Dell_Chassis_PowerSupply_RollupStatus.setProtocol("wsman")
Dell_Chassis_PowerSupply_RollupStatus.setClassName("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_PowerSupply")
Dell_Chassis_PowerSupply_Obj.setAttributePropertyObject(Dell_Chassis_PowerSupply_RollupStatus)
Dell_Chassis_PowerSupply_Obj.setAttributeDictionary("HealthState")

Dell_Chassis_PowerSupply_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.PowerSupply",Dell_Chassis_PowerSupply_Obj
End Function

Public Function PopulatePCIeProfileDictionary
'PCIe
Dim Dell_Chassis_PCIe_Obj
Set Dell_Chassis_PCIe_Obj = New ProfileInformation
Dell_Chassis_PCIe_Obj.setProfileName("Dell.Chassis.PCIeDevice")

Dim Dell_Chassis_PCIe_FQDD
Set Dell_Chassis_PCIe_FQDD = New AttributeProperty
Dell_Chassis_PCIe_FQDD.setProtocol("wsman")
Dell_Chassis_PCIe_FQDD.setClassName("cimv2/DCIM_ChassisPCIDeviceView")
Dell_Chassis_PCIe_FQDD.setProtocolAttributeName("FQDD")
Dell_Chassis_PCIe_Obj.setAttributePropertyObject(Dell_Chassis_PCIe_FQDD)
Dell_Chassis_PCIe_Obj.setAttributeDictionary("FQDD")

Dim Dell_Chassis_PCIe_PrimaryStatus
Set Dell_Chassis_PCIe_PrimaryStatus = New AttributeProperty
Dell_Chassis_PCIe_PrimaryStatus.setProtocol("wsman")
Dell_Chassis_PCIe_PrimaryStatus.setClassName("cimv2/DCIM_ChassisPCIDeviceView")
Dell_Chassis_PCIe_PrimaryStatus.setProtocolAttributeName("PrimaryStatus")
Dell_Chassis_PCIe_Obj.setAttributePropertyObject(Dell_Chassis_PCIe_PrimaryStatus)
Dell_Chassis_PCIe_Obj.setAttributeDictionary("HealthState")

Dell_Chassis_PCIe_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.PCIeDevice",Dell_Chassis_PCIe_Obj
End Function

Public Function PopulateStorageProfileDictionary
'Storage Controller
Dim Dell_Chassis_Storage_Controller_Obj
Set Dell_Chassis_Storage_Controller_Obj = New ProfileInformation
Dell_Chassis_Storage_Controller_Obj.setProfileName("Dell.Chassis.Storage.Controller")

Dim Dell_ChassisStorage_Controller_FQDD
Set Dell_ChassisStorage_Controller_FQDD = New AttributeProperty
Dell_ChassisStorage_Controller_FQDD.setProtocol("wsman")
Dell_ChassisStorage_Controller_FQDD.setClassName("cimv2/DCIM_ControllerView")
Dell_ChassisStorage_Controller_FQDD.setProtocolAttributeName("FQDD")
Dell_Chassis_Storage_Controller_Obj.setAttributePropertyObject(Dell_ChassisStorage_Controller_FQDD)
Dell_Chassis_Storage_Controller_Obj.setAttributeDictionary("FQDD")

Dim Dell_ChassisStorage_Controller_RollupStatus
Set Dell_ChassisStorage_Controller_RollupStatus = New AttributeProperty
Dell_ChassisStorage_Controller_RollupStatus.setProtocol("wsman")
Dell_ChassisStorage_Controller_RollupStatus.setClassName("cimv2/DCIM_ControllerView")
Dell_Chassis_Storage_Controller_Obj.setAttributePropertyObject(Dell_ChassisStorage_Controller_RollupStatus)
Dell_Chassis_Storage_Controller_Obj.setAttributeDictionary("RollupStatus")

Dell_Chassis_Storage_Controller_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.Storage.Controller",Dell_Chassis_Storage_Controller_Obj

'Storage Controller Battery
Dim Dell_Chassis_Storage_Controller_Battery_Obj
Set Dell_Chassis_Storage_Controller_Battery_Obj = New ProfileInformation
Dell_Chassis_Storage_Controller_Battery_Obj.setProfileName("Dell.Chassis.Storage.Controller.Battery")

Dim Dell_ChassisStorage_Controller_Battery_FQDD
Set Dell_ChassisStorage_Controller_Battery_FQDD = New AttributeProperty
Dell_ChassisStorage_Controller_Battery_FQDD.setProtocol("wsman")
Dell_ChassisStorage_Controller_Battery_FQDD.setClassName("cimv2/DCIM_ControllerBatteryView")
Dell_ChassisStorage_Controller_Battery_FQDD.setProtocolAttributeName("FQDD")
Dell_Chassis_Storage_Controller_Battery_Obj.setAttributePropertyObject(Dell_ChassisStorage_Controller_Battery_FQDD)
Dell_Chassis_Storage_Controller_Battery_Obj.setAttributeDictionary("FQDD")

Dim Dell_ChassisStorage_Controller_Battery_PrimaryStatus
Set Dell_ChassisStorage_Controller_Battery_PrimaryStatus = New AttributeProperty
Dell_ChassisStorage_Controller_Battery_PrimaryStatus.setProtocol("wsman")
Dell_ChassisStorage_Controller_Battery_PrimaryStatus.setClassName("cimv2/DCIM_ControllerBatteryView")
Dell_Chassis_Storage_Controller_Battery_Obj.setAttributePropertyObject(Dell_ChassisStorage_Controller_Battery_PrimaryStatus)
Dell_Chassis_Storage_Controller_Battery_Obj.setAttributeDictionary("PrimaryStatus")

Dell_Chassis_Storage_Controller_Battery_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.Storage.Controller.Battery",Dell_Chassis_Storage_Controller_Battery_Obj

'Enclosure
Dim Dell_Chassis_Storage_Controller_Enclosure_Obj
Set Dell_Chassis_Storage_Controller_Enclosure_Obj = New ProfileInformation
Dell_Chassis_Storage_Controller_Enclosure_Obj.setProfileName("Dell.Chassis.Storage.Controller.Enclosure")

Dim Dell_Chassis_Storage_Controller_Enclosure_FQDD
Set Dell_Chassis_Storage_Controller_Enclosure_FQDD = New AttributeProperty
Dell_Chassis_Storage_Controller_Enclosure_FQDD.setProtocol("wsman")
Dell_Chassis_Storage_Controller_Enclosure_FQDD.setClassName("cimv2/DCIM_EnclosureView")
Dell_Chassis_Storage_Controller_Enclosure_FQDD.setProtocolAttributeName("FQDD")
Dell_Chassis_Storage_Controller_Enclosure_Obj.setAttributePropertyObject(Dell_Chassis_Storage_Controller_Enclosure_FQDD)
Dell_Chassis_Storage_Controller_Enclosure_Obj.setAttributeDictionary("FQDD")

Dim Dell_Chassis_Storage_Controller_Enclosure_RollupStatus
Set Dell_Chassis_Storage_Controller_Enclosure_RollupStatus = New AttributeProperty
Dell_Chassis_Storage_Controller_Enclosure_RollupStatus.setProtocol("wsman")
Dell_Chassis_Storage_Controller_Enclosure_RollupStatus.setClassName("cimv2/DCIM_EnclosureView")
Dell_Chassis_Storage_Controller_Enclosure_Obj.setAttributePropertyObject(Dell_Chassis_Storage_Controller_Enclosure_RollupStatus)
Dell_Chassis_Storage_Controller_Enclosure_Obj.setAttributeDictionary("RollupStatus")

Dell_Chassis_Storage_Controller_Enclosure_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.Storage.Controller.Enclosure",Dell_Chassis_Storage_Controller_Enclosure_Obj

'VirtualDisk
Dim Dell_Chassis_Storage_Controller_VirtualDisk_Obj
Set Dell_Chassis_Storage_Controller_VirtualDisk_Obj = New ProfileInformation
Dell_Chassis_Storage_Controller_VirtualDisk_Obj.setProfileName("Dell.Chassis.Storage.Controller.VirtualDisk")


Dim Dell_Chassis_Storage_Controller_VirtualDisk_FQDD
Set Dell_Chassis_Storage_Controller_VirtualDisk_FQDD = New AttributeProperty
Dell_Chassis_Storage_Controller_VirtualDisk_FQDD.setProtocol("wsman")
Dell_Chassis_Storage_Controller_VirtualDisk_FQDD.setClassName("cimv2/DCIM_VirtualDiskView")
Dell_Chassis_Storage_Controller_VirtualDisk_FQDD.setProtocolAttributeName("FQDD")
Dell_Chassis_Storage_Controller_VirtualDisk_Obj.setAttributePropertyObject(Dell_Chassis_Storage_Controller_VirtualDisk_FQDD)
Dell_Chassis_Storage_Controller_VirtualDisk_Obj.setAttributeDictionary("FQDD")

Dim Dell_Chassis_Storage_Controller_VirtualDisk_PrimaryStatus
Set Dell_Chassis_Storage_Controller_VirtualDisk_PrimaryStatus = New AttributeProperty
Dell_Chassis_Storage_Controller_VirtualDisk_PrimaryStatus.setProtocol("wsman")
Dell_Chassis_Storage_Controller_VirtualDisk_PrimaryStatus.setClassName("cimv2/DCIM_VirtualDiskView")
Dell_Chassis_Storage_Controller_VirtualDisk_Obj.setAttributePropertyObject(Dell_Chassis_Storage_Controller_VirtualDisk_PrimaryStatus)
Dell_Chassis_Storage_Controller_VirtualDisk_Obj.setAttributeDictionary("PrimaryStatus")

Dell_Chassis_Storage_Controller_VirtualDisk_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.Storage.Controller.VirtualDisk",Dell_Chassis_Storage_Controller_VirtualDisk_Obj

'PhysicalDisk

Dim Dell_Chassis_Storage_Controller_PhysicalDisk_Obj
Set Dell_Chassis_Storage_Controller_PhysicalDisk_Obj = New ProfileInformation
Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.setProfileName("Dell.Chassis.Storage.Controller.PhysicalDisk")

Dim Dell_Chassis_Storage_Controller_PhysicalDisk_FQDD
Set Dell_Chassis_Storage_Controller_PhysicalDisk_FQDD = New AttributeProperty
Dell_Chassis_Storage_Controller_PhysicalDisk_FQDD.setProtocol("wsman")
Dell_Chassis_Storage_Controller_PhysicalDisk_FQDD.setClassName("cimv2/DCIM_PhysicalDiskView")
Dell_Chassis_Storage_Controller_PhysicalDisk_FQDD.setProtocolAttributeName("FQDD")
Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.setAttributePropertyObject(Dell_Chassis_Storage_Controller_PhysicalDisk_FQDD)
Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.setAttributeDictionary("FQDD")

'Primary Status
Dim Dell_Server_Storage_Controller_PhysicalDisk_PrimaryStatus
Set Dell_Server_Storage_Controller_PhysicalDisk_PrimaryStatus = New AttributeProperty
Dell_Server_Storage_Controller_PhysicalDisk_PrimaryStatus.setProtocol("wsman")
Dell_Server_Storage_Controller_PhysicalDisk_PrimaryStatus.setClassName("cimv2/DCIM_PhysicalDiskView")
Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.setAttributePropertyObject(Dell_Server_Storage_Controller_PhysicalDisk_PrimaryStatus)
Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.setAttributeDictionary("PrimaryStatus")

'Predictive Failure State
Dim Dell_Server_Storage_Controller_PhysicalDisk_PredictiveFailureState
Set Dell_Server_Storage_Controller_PhysicalDisk_PredictiveFailureState = New AttributeProperty
Dell_Server_Storage_Controller_PhysicalDisk_PredictiveFailureState.setProtocol("wsman")
Dell_Server_Storage_Controller_PhysicalDisk_PredictiveFailureState.setClassName("cimv2/DCIM_PhysicalDiskView")
Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.setAttributePropertyObject(Dell_Server_Storage_Controller_PhysicalDisk_PredictiveFailureState)
Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.setAttributeDictionary("PredictiveFailureState")

Dell_Chassis_Storage_Controller_PhysicalDisk_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.Storage.Controller.PhysicalDisk",Dell_Chassis_Storage_Controller_PhysicalDisk_Obj
End Function

Public Function PopulatePowerSupplyGroupProfileDictionary
'PowerSupply Group
log.MOMDebugLog 1, "Entered POwerSupply Group Dict"
Dim Dell_Chassis_PowerSupplyGroup_racadm_Obj
Set Dell_Chassis_PowerSupplyGroup_racadm_Obj = New ProfileInformation
Dell_Chassis_PowerSupplyGroup_racadm_Obj.setProfileName("Dell.Chassis.PowerSupplyGroup.racadm")

log.MOMDebugLog 1, "Dell.Chassis.PowerSupplyGroup.racadm Added"
Dim Dell_Chassis_PowerSupplyGroup_racadm_ID
Set Dell_Chassis_PowerSupplyGroup_racadm_ID = New AttributeProperty
Dell_Chassis_PowerSupplyGroup_racadm_ID.setProtocol("racadm")
Dell_Chassis_PowerSupplyGroup_racadm_ID.setClassName("getpbinfo")
Dell_Chassis_PowerSupplyGroup_racadm_ID.setProtocolAttributeName("ID")
Dell_Chassis_PowerSupplyGroup_racadm_ID.setSearchKey("PowerSupplyGroup")
Dell_Chassis_PowerSupplyGroup_racadm_Obj.setAttributePropertyObject(Dell_Chassis_PowerSupplyGroup_racadm_ID)
Dell_Chassis_PowerSupplyGroup_racadm_Obj.setAttributeDictionary("ID")


Dim Dell_Chassis_PowerSupplyGroup_racadm_OverallPowerHealth
Set Dell_Chassis_PowerSupplyGroup_racadm_OverallPowerHealth = New AttributeProperty
Dell_Chassis_PowerSupplyGroup_racadm_OverallPowerHealth.setProtocol("racadm")
Dell_Chassis_PowerSupplyGroup_racadm_OverallPowerHealth.setClassName("getpbinfo")
Dell_Chassis_PowerSupplyGroup_racadm_OverallPowerHealth.setProtocolAttributeName("OverallPowerHealth")
Dell_Chassis_PowerSupplyGroup_racadm_OverallPowerHealth.setSearchKey("PowerSupplyGroup")
Dell_Chassis_PowerSupplyGroup_racadm_Obj.setAttributePropertyObject(Dell_Chassis_PowerSupplyGroup_racadm_OverallPowerHealth)
Dell_Chassis_PowerSupplyGroup_racadm_Obj.setAttributeDictionary("OverallPowerHealth")

Dim Dell_Chassis_PowerSupplyGroup_racadm_Redundancy
Set Dell_Chassis_PowerSupplyGroup_racadm_Redundancy = New AttributeProperty
Dell_Chassis_PowerSupplyGroup_racadm_Redundancy.setProtocol("racadm")
Dell_Chassis_PowerSupplyGroup_racadm_Redundancy.setClassName("getpbinfo")
Dell_Chassis_PowerSupplyGroup_racadm_Redundancy.setProtocolAttributeName("Redundancy")
Dell_Chassis_PowerSupplyGroup_racadm_Redundancy.setSearchKey("PowerSupplyGroup")
Dell_Chassis_PowerSupplyGroup_racadm_Obj.setAttributePropertyObject(Dell_Chassis_PowerSupplyGroup_racadm_Redundancy)
Dell_Chassis_PowerSupplyGroup_racadm_Obj.setAttributeDictionary("Redundancy")

Dell_Chassis_PowerSupplyGroup_racadm_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Chassis.PowerSupplyGroup.racadm",Dell_Chassis_PowerSupplyGroup_racadm_Obj


End Function

'#################################################################################################################################
</ProfileDictionaryScript>
<ComponentInstanceFactoryScript>
'#################################################################################################################################
'**************************************************************************************************
'Component Instance Classes
'**************************************************************************************************
Dim creatorFactory: Set creatorFactory = CreateObject("Scripting.Dictionary")

Class cmcHealthInstance
'This function will compute the health of CMC and populate it to the corresponding instance
'CASE-I - RACADM is present on system
' In this case there will be multiple instances for CMC, e.g CMC-1,CMC-2 and the health of those components will be dependent on RACADM Dictionary(compObject)
'CASE-II - RACADM is not present
' In this case only one instance is available, and its id(FQDD) will be "CMC-Primary" and health of the instance will be "warning"
' Reason Code for this unit monitor will be "RACADM is required to view the health, Install RACADM on Management Server"
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject, ByRef racadmPresence)
If StrComp(racadmPresence, "Yes") = 0 Then
Dim className, instIndex, status, state
Dim statusMap, statusValue
Dim cmcObj
For Each cmcObj in compObject
If InStr(Lcase(cmcObj.getAttributevalue("FQDD")),"cmc") Then
className = "Dell.Chassis.cmc.racadm"
instIndex = cmcObj.getAttributevalue("FQDD")
status = cmcObj.getAttributevalue("Health")
If (StrComp(status, "OK") = 0) Then
state = "OK"
ElseIf (StrComp(status, "Not OK") = 0) Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "CMC Health Instance" &amp; "Status&gt;&gt; " &amp; status &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", status)
Call omAPIHelper.AddDataItem()
End If
Next
Else
log.MOMDebugLog 1, "CMC Health Instance" &amp; "Status&gt;&gt; Warning instance index&gt;&gt; CMC-Primary state&gt;&gt; Warning"
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", "Dell.Chassis.cmc.racadm")
Call omAPIHelper.AddInstValue ("InstanceIndex", "CMC-Primary")
Call omAPIHelper.AddInstValue ("Status", "Warning")
Call omAPIHelper.AddInstValue ("Status Code", "Warning")
Call omAPIHelper.AddInstValue ("Status Code Value", "Warning")
Call omAPIHelper.AddInstValue ("Reason Code ", "RACADM is required to view the health, Install RACADM on Management Server")
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.cmc.racadm", new cmcHealthInstance

Class ioModuleHealthInstance
Private Sub Class_Initialize
End Sub
'This function will compute the health of IO Module and populate it to the corresponding instance
'This function will be called only when RACADM is not present on the system
'a) It gets Instance Ids from WSMAN profile
'b) Add health = "Warning" (As its health is dependent on RACADM)
'c) Add Reason Code = "RACADM is required to view the health, Install RACADM on Management Server"
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject, ByRef racadmPresence)
Dim className,instIndex,ioObj
className = "Dell.Chassis.IO.Racadm"
If StrComp(racadmPresence, "Yes") = 0 Then
Dim status, state , LineItems , switchNum, switch
Dim statusMap, statusValue
For Each ioObj in compObject
If InStr(Lcase(ioObj.getAttributevalue("FQDD")),"switch") Then
switch = ioObj.getAttributevalue("FQDD")
LineItems = split(switch,"-")
switchNum = LineItems(1)
instIndex = "iom"&amp; switchNum
status = ioObj.getAttributevalue("Health")
If (StrComp(status, "OK") = 0) Then
state = "OK"
ElseIf (StrComp(status, "Not OK") = 0) Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "IO Module Health Instance" &amp; "Status&gt;&gt; " &amp; status &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", status)
Call omAPIHelper.AddDataItem()
End If
Next
Else
For Each ioObj in compObject
className = "Dell.Chassis.IO.Racadm"
instIndex = ioObj.getAttributevalue("FQDD")
log.MOMDebugLog 1, "IO Module Health Instance" &amp; "Status WSMAN IOMODULE &gt;&gt; " &amp; "Warning" &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; "Warning"
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", Trim(instIndex))
Call omAPIHelper.AddInstValue ("Status", "Warning")
Call omAPIHelper.AddInstValue ("Status Code", "Warning")
Call omAPIHelper.AddInstValue ("Status Code Value", "Warning")
Call omAPIHelper.AddInstValue ("Reason Code", "RACADM is required to view the health, Install RACADM on Management Server")
Call omAPIHelper.AddDataItem()
Next
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.IO.Racadm", new ioModuleHealthInstance

Class PCIeHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
className = "Dell.Chassis.PCIeDevice"
instIndex = compObject.getAttributevalue("FQDD")
status = compObject.getAttributevalue("HealthState")
'statusMap = Array("Unknown", "OK", "Degraded/Warning", "Minor failure", "Major failure", "Critical failure", "Non-recoverable error")
'statusValue = statusMap(status)
If status = "5" Then
state = "OK"
ElseIf status = "0" OR status = "10" OR status = "15" Then
state = "Warning"
ElseIf status = "20" OR status = "25" OR status = "30" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "PCIe Health Instance" &amp; "Status&gt;&gt; " &amp; status &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", status)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.PCIeDevice", new PCIeHealthInstance

Class FanHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
className = "Dell.Chassis.Fan"
instIndex = compObject.getAttributevalue("FQDD")
status = compObject.getAttributevalue("HealthState")
'statusMap = Array("Unknown", "OK", "Degraded/Warning", "Minor failure", "Major failure", "Critical failure", "Non-recoverable error")
'statusValue = statusMap(status)
If status = "5" Then
state = "OK"
ElseIf status = "0" OR status = "10" OR status = "15" Then
state = "Warning"
ElseIf status = "20" OR status = "25" OR status = "30" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "Fan Health Instance" &amp; "Status&gt;&gt; " &amp; status &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", status)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.Fan", new FanHealthInstance

Class PowerSupplyHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
className = "Dell.Chassis.PowerSupply"
instIndex = compObject.getAttributevalue("FQDD")
status = compObject.getAttributevalue("HealthState")
'statusMap = Array("Unknown", "OK", "Degraded/Warning", "Minor failure", "Major failure", "Critical failure", "Non-recoverable error")
'statusValue = statusMap(status)
If status = "5" Then
state = "OK"
ElseIf status = "0" OR status = "10" OR status = "15" Then
state = "Warning"
ElseIf status = "20" OR status = "25" OR status = "30" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "PowerSupply Health Instance" &amp; "Status&gt;&gt; " &amp; status &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", status)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.PowerSupply", new PowerSupplyHealthInstance

Class PowerSupplyGroupHealthInstance
Private Sub Class_Initialize
End Sub
'This function will compute the health of PowerSupply Group
'CASE-I - RACADM is present on system
' In this case health will taken from RACADM
'CASE-II - RACADM is not present
' Instance Id will be taken from UNIT Monitor Target and health will be hardcoded as "Warning"
' Reason Code for this unit monitor will be "RACADM is required to view the health, Install RACADM on Management Server"
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject, ByRef racadmPresence )
Dim className, instIndex, ServTagObj
className = "Dell.Chassis.PowerSupplyGroup.racadm"
If StrComp(racadmPresence, "Yes") = 0 Then
Dim redudancyStatus, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
Dim powerHealth
instIndex = compObject.getAttributevalue("ID")
If(instIndex &lt;&gt; "Not Available") then
powerHealth = compObject.getAttributevalue("OverallPowerHealth")
redudancyStatus = compObject.getAttributevalue("Redundancy")

If Instr(powerHealth,"Not OK") Then
If Instr(redudancyStatus,"Yes") Then
state = "Warning"
ElseIf Instr(redudancyStatus,"No") AND Instr(powerHealth,"Not OK") Then
state = "Error"
End If
ElseIf Instr(powerHealth,"OK") Then
state = "OK"
End If

log.MOMDebugLog 1, "PowerSupply Group Health Status&gt;&gt; "&amp;powerHealth &amp; " Redundancy&gt;&gt; " &amp;redudancyStatus&amp; " state&gt;&gt; " &amp; state &amp;" instIndex &gt;&gt; "&amp;instIndex
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", redudancyStatus)
Call omAPIHelper.AddInstValue ("Status Code Value", redudancyStatus)
Call omAPIHelper.AddDataItem()
End If
End If
Else
For Each ServTagObj in compObject
instIndex = ServTagObj.getAttributevalue("ServiceTag")
log.MOMDebugLog 1, "PowerSupply Group Health without RACADM "&amp; "Status&gt;&gt; " &amp; "warning" &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; "warning"
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", "Warning")
Call omAPIHelper.AddInstValue ("Status Code", "Yes")
Call omAPIHelper.AddInstValue ("Status Code Value", "Yes")
Call omAPIHelper.AddInstValue ("Reason Code", "RACADM is required to view the health, Install RACADM on Management Server")
Call omAPIHelper.AddDataItem()
Next
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.PowerSupplyGroup.racadm", new PowerSupplyGroupHealthInstance

Class CMCGroupHealthInstance
'This function will compute the health of CMC Group
'CASE-I - RACADM is present on system
' In this case health will taken from RACADM
'CASE-II - RACADM is not present
' Instance Id will be taken from UNIT Monitor Target and health will be hardcoded as "Warning"
' Reason Code for this unit monitor will be "RACADM is required to view the health, Install RACADM on Management Server"
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject, ByRef racadmPresence)
Dim className, instIndex, status, state,primaryCMC, ServTagObj
className = "Dell.Chassis.CMCGroup.racadm"
If StrComp(racadmPresence, "Yes") = 0 Then
Dim statusMap, statusValue
If Not compObject is Nothing Then
instIndex = compObject.getAttributevalue("ChassisServiceTag")
status = compObject.getAttributevalue("Health")
primaryCMC = compObject.getAttributevalue("PowerState")

IF instIndex &lt;&gt; "Not Available" AND instIndex &lt;&gt; "N/A" AND primaryCMC = "Primary" Then
If (StrComp(status, "OK") = 0) Then
state = "OK"
ElseIf (StrComp(status, "Not OK") = 0) Then
state = "Error"
End If
log.MOMDebugLog 1, "CMC Group Health Instance" &amp; "Status&gt;&gt; " &amp; status &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", status)
Call omAPIHelper.AddDataItem()
END IF
End If
Else
For Each ServTagObj in compObject
instIndex = ServTagObj.getAttributevalue("ServiceTag")
log.MOMDebugLog 1, "CMC Group Health Instance without racadm" &amp; "Status&gt;&gt; " &amp; "warning" &amp; " instance index&gt;&gt; " &amp; instIndex &amp; " state&gt;&gt; " &amp; "warning"
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex",instIndex)
Call omAPIHelper.AddInstValue ("Status", "warning")
Call omAPIHelper.AddInstValue ("Status Code", "warning")
Call omAPIHelper.AddInstValue ("Status Code Value", "warning")
Call omAPIHelper.AddInstValue ("Reason Code ", "RACADM is required to view the health, Install RACADM on Management Server")
Call omAPIHelper.AddDataItem()
Next
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.CMCGroup.racadm", new CMCGroupHealthInstance

Class ControllerHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
className = "Dell.Chassis.Storage.Controller"
instIndex = compObject.getAttributevalue("FQDD")
status = compObject.getAttributevalue("RollupStatus")
statusMap = Array("Unknown", "OK", "Degraded", "Error")
statusValue = statusMap(status)
If status = "1" Then
state = "OK"
ElseIf status = "2" OR status = "0" Then
state = "Warning"
ElseIf status = "3" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "Controller Health Instance" &amp; "Status&gt;&gt; " &amp; status &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", statusValue)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.Storage.Controller", new ControllerHealthInstance

Class ControllerBatteryHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef contObject, ByRef contBatteryObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not contBatteryObject is Nothing Then
className = "Dell.Chassis.Storage.Controller.Battery"
instIndex = contObject.getAttributevalue("FQDD")
status = contBatteryObject.getAttributevalue("PrimaryStatus")
statusMap = Array("Unknown", "OK", "Degraded", "Error")
statusValue = statusMap(status)
If status = "1" Then
state = "OK"
ElseIf status = "2" OR status = "0" Then
state = "Warning"
ElseIf status = "3" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "Controller Battery HealthInstance" &amp; "Status&gt;&gt; " &amp; status &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", statusValue)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.Storage.Controller.Battery", new ControllerBatteryHealthInstance



Class EnclosureHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
className = "Dell.Chassis.Storage.Controller.Enclosure"

instIndex = compObject.getAttributevalue("FQDD")
status = compObject.getAttributevalue("RollupStatus")

statusMap = Array("Unknown", "OK", "Degraded", "Error")
statusValue = statusMap(status)
If status = "1" Then
state = "OK"
ElseIf status = "2" OR status = "0" Then
state = "Warning"
ElseIf status = "3" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "EnclosureHealthInstance" &amp; "Status&gt;&gt; " &amp; status &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", statusValue)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.Storage.Controller.Enclosure", new EnclosureHealthInstance

Class VirtualDiskHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
className = "Dell.Chassis.Storage.Controller.VirtualDisk"
instIndex = compObject.getAttributevalue("FQDD")
status = compObject.getAttributevalue("PrimaryStatus")
statusMap = Array("Unknown", "OK", "Degraded", "Error")
statusValue = statusMap(status)
If status = "1" Then
state = "OK"
ElseIf status = "2" OR status = "0" Then
state = "Warning"
ElseIf status = "3" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "VirtualDiskHealthInstance" &amp; "Status&gt;&gt; " &amp; status &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", statusValue)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.Storage.Controller.VirtualDisk", new VirtualDiskHealthInstance

Class PhysicalDiskPrimaryStatusHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
instIndex = compObject.getAttributevalue("FQDD")
If (Instr(Lcase(instIndex),"internal")) Then
log.MOMDebugLog 1, "instIndex&gt;&gt; " &amp; instIndex
className = "Dell.Chassis.Storage.Controller.Enclosure.InternalPhysicalDisk.PrimaryStatus"
ElseIf (Instr(Lcase(instIndex),"external")) Then
log.MOMDebugLog 1, "instIndex&gt;&gt; " &amp; instIndex
className = "Dell.Chassis.Storage.Controller.Enclosure.ExternalPhysicalDisk.PrimaryStatus"
End If
status = compObject.getAttributevalue("PrimaryStatus")
statusMap = Array("Unknown", "OK", "Degraded", "Error")
statusValue = statusMap(status)
If status = "1" Then
state = "OK"
ElseIf status = "2" OR status = "0" Then
state = "Warning"
ElseIf status = "3" Then
state = "Error"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "PhysicalDisk PrimaryStatus HealthInstance" &amp; "Status&gt;&gt; " &amp; status &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", statusValue)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.Storage.Controller.PhysicalDisk.PrimaryStatus", new PhysicalDiskPrimaryStatusHealthInstance

Class PhysicalDiskPredictiveFailureHealthInstance
Private Sub Class_Initialize
End Sub
Public Function CreateAndPopulateHealthInstance(ByRef omAPIHelper, ByRef compObject)
Dim className, instIndex, status, state
Dim statusMap, statusValue
If Not compObject is Nothing Then
instIndex = compObject.getAttributevalue("FQDD")
If (Instr(Lcase(instIndex),"internal")) Then
log.MOMDebugLog 1, "instIndex&gt;&gt; " &amp; instIndex
className = "Dell.Chassis.Storage.Controller.Enclosure.InternalPhysicalDisk.PredictiveFailure"
ElseIf (Instr(Lcase(instIndex),"external")) Then
log.MOMDebugLog 1, "instIndex&gt;&gt; " &amp; instIndex
className = "Dell.Chassis.Storage.Controller.Enclosure.ExternalPhysicalDisk.PredictiveFailure"
End If
status = compObject.getAttributevalue("PredictiveFailureState")
statusMap = Array("Smart Alert Absent", "Smart Alert Present")
statusValue = statusMap(status)
If status = "0" Then
state = "OK"
ElseIf status = "1" Then
state = "Warning"
Else
state = "Warning"
End If
log.MOMDebugLog 1, "PhysicalDisk Predictive Failure HealthInstance" &amp; "Status&gt;&gt; " &amp; status &amp; " state&gt;&gt; " &amp; state
Call omAPIHelper.CreatePropertyBag()
Call omAPIHelper.AddInstValue ("ComponentType", className)
Call omAPIHelper.AddInstValue ("InstanceIndex", instIndex)
Call omAPIHelper.AddInstValue ("Status", state)
Call omAPIHelper.AddInstValue ("Status Code", status)
Call omAPIHelper.AddInstValue ("Status Code Value", statusValue)
Call omAPIHelper.AddDataItem()
End If
End Function
End Class
creatorFactory.Add "Dell.Chassis.Storage.Controller.PhysicalDisk.PredictiveFailure", new PhysicalDiskPredictiveFailureHealthInstance


'#################################################################################################################################
</ComponentInstanceFactoryScript>
<ChassisStorageHealth>
'#################################################################################################################################
'**************************************************************************************************
'We will list all the possible components of chassis(M1000e, VRTx, Stomp) and a dicctionary is created with key as component names and values as Yes/No
'where Yes means there is no need to verify MN for the support WS-MAN profile otherwise do verify. In that way we will populate the dictionary and send
'the dictionary to profile dictionary creation, there if dictionary value is No then that particular components are not populated in profile. The main
'will again go through dictionary value in population of component instances.


'We are pre-checking the presence of wsman profile on MN side.
Dim compDict, profilesPresenceDict, compDictKeys, Key, profilePresence, racadmPresence
Dim racadmCompDict, racadmProfilePresenceDict, racadmDictKeys, racadmKey, racadmprofilePresence, racadmObject
Set racadmObject = New racadmDictionaryCreator
racadmPresence = racadmObject.IsRacadmPresent
Set compDict = CreateObject("Scripting.Dictionary")
compDict.CompareMode = vbTextCompare

compDict.Add "Fan", "http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_Fan"
compDict.Add "PowerSupply", "http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_PowerSupply"
compDict.Add "Storage", "cimv2/DCIM_ControllerView"
compDict.Add "PCIeDevice", "cimv2/DCIM_ChassisPCIDeviceView"
'In the absence of RACADM,we need to get Instance Ids of IO Module components from WSMAN to set their health as Warning,
'thats why adding IOModule to WSMAN dictionary if RACADM presence = NO
If StrComp(racadmPresence, "No") = 0 Then
compDict.Add "IOModule", "http://schemas.dell.com/wbem/wscim/1/cim-schema/2/root/dell/Dell_PassThroughModule"
compDict.Add "CMCPSServiceTag", "cimv2/DCIM_ModularChassisView"
End If

'Following components will check for wsman profile presence
set profilesPresenceDict = CheckProfilesPresenceFromDevice(compDict)
compDictKeys = profilesPresenceDict.Keys
For Each Key in compDictKeys
profilePresence = profilesPresenceDict.Item(Key)
log.MOMDebugLog 1, "The component" &amp; Key &amp; " has profile presence as---" &amp; profilePresence
If (StrComp(profilePresence,"Yes") = 0 ) Then
If (StrComp(Key,"Storage") = 0) Then
log.MOMDebugLog 1, "Populating Storage profile dictionary"
PopulateStorageProfileDictionary
End If

If (StrComp(Key,"Fan") = 0) Then
log.MOMDebugLog 1, "Populating Fan profile dictionary"
PopulateFanProfileDictionary
End If

If (StrComp(Key,"PCIeDevice") = 0) Then
log.MOMDebugLog 1, "Populating PCIe Device profile dictionary"
PopulatePCIeProfileDictionary
End If

If (StrComp(Key,"PowerSupply") = 0) Then
log.MOMDebugLog 1, "Populating Power Supply profile dictionary"
PopulatePowerSupplyProfileDictionary
End If

If (StrComp(Key,"IOModule") = 0) Then
log.MOMDebugLog 1, "Populating IO Module profile dictionary"
PopulateWsmanIOProfileDictionary
End If

If (StrComp(Key,"CMCPSServiceTag") = 0) Then
log.MOMDebugLog 1, "Populating PowerSupplyGroup and CMCGroup profile dictionary"
PopulateWsmanCMCServiceTagProfileDictionary
End If
End If
Next

'Currently we are not pre-checking for the presence of racadm output for commands so we will make presnece by default yes. When you do health calculation
'the component health is updated only when all the commands are supported by racadm installed on machine

Set racadmCompDict = CreateObject("Scripting.Dictionary")
racadmCompDict.CompareMode = vbTextCompare

Set racadmProfilePresenceDict = CreateObject("Scripting.Dictionary")
racadmProfilePresenceDict.CompareMode = vbTextCompare

racadmCompDict.Add "CMC" , ""
'In the absence of RACADM,we need to get Instance Ids of IO Module components from WSMAN to set their health as Warning,
'thats why adding IOModule to RACADM dictionary only if RACADM presence = Yes
If StrComp(racadmPresence, "Yes") = 0 Then
racadmCompDict.Add "IOModule" , ""
racadmCompDict.Add "PowerSupplyGroup" , ""
racadmCompDict.Add "CMCGroup" , ""
End If


racadmProfilePresenceDict.Add "CMC" , "Yes"
'In the absence of RACADM,we need to get Instance Ids of IO Module components from WSMAN to set their health as Warning,
'thats why adding IOModule to RACADM dictionary only if RACADM presence = Yes
If StrComp(racadmPresence, "Yes") = 0 Then
racadmProfilePresenceDict.Add "IOModule" , "Yes"
racadmProfilePresenceDict.Add "PowerSupplyGroup" , "Yes"
racadmProfilePresenceDict.Add "CMCGroup" , "Yes"
End If

racadmDictKeys = racadmProfilePresenceDict.Keys

'Prechecking the presence of RACADM
'Create RACADM dictionaries only when RACADM is available
'If RACADM is not available then no need to populate RACADM dictionary
If StrComp(racadmPresence, "Yes") = 0 Then
For Each racadmKey in racadmDictKeys
racadmprofilePresence = racadmProfilePresenceDict.Item(racadmKey)
log.MOMDebugLog 1, "The component" &amp; racadmKey &amp; " has profile presence as---" &amp; racadmprofilePresence
If(StrComp(racadmprofilePresence, "Yes") = 0) Then
If(StrComp(racadmKey, "CMC") = 0) Then
log.MOMDebugLog 1, "Populating CMC profile dictionary"
PopulateCMCProfileDictionary
End If
If(StrComp(racadmKey, "IOModule") = 0) Then
'populate IO module profile dictionary
log.MOMDebugLog 1, "Populating IO profile dictionary"
PopulateIOProfileDictionary
End If
If(StrComp(racadmKey, "PowerSupplyGroup") = 0) Then
'populate power supply profile dictionary
PopulatePowerSupplyGroupProfileDictionary
End If
End If
Next
End If


'Reading from profile dictionary
Dim profDictReader, protoList, classList, racadmCmdList
Set profDictReader = New ProfileDictionaryReader
'profileInfoDict is got created by above pre-checking section and that code is part of &lt;profileDictionaryScript&gt;
profDictReader.setListofProtocolAndClassNames(profileInfoDict)
protoList = profDictReader.getProtocolList()
classList = profDictReader.getClassNameList()
racadmCmdList = profDictReader.getracadmCmdList()

Dim protFactoryObj
Set protFactoryObj = New ProtocolFactory
Dim protocol, cmd
Dim wsmanInvDataParser, compObjectList, wsmanHelperOject, wsmanInventoryProfileHandle, i
Dim racadmcompObjList
Dim wsmanPresence
wsmanPresence = "No"
Set wsmanHelperOject = Nothing
Set wsmanInvDataParser = Nothing
Set compObjectList = Nothing
set wsmanInventoryProfileHandle=CreateObject("Scripting.Dictionary")
wsmanInventoryProfileHandle.CompareMode = vbTextCompare
Dim racadmDataParserObj, racadmcompObjectList, racadmInventoryProfileHandle
For Each protocol in protoList
If (StrComp(protocol,"wsman") = 0) Then
Set wsmanHelperOject = protFactoryObj.getProtocolHelperObject(protocol, protParameterObj)
wsmanHelperOject.ProfileNameArrayObj=classList
Set wsmanInventoryProfileHandle = wsmanHelperOject.GetProfileDictionary()
If IsNull(wsmanInventoryProfileHandle) Then
log.MOMDebugLog 1, "Dell Device Helper returned null value. No wsman inventory will be found for this device"
else
log.MOMDebugLog 1, "Dell Device helper successfully retrieved all required profiles from device"
wsmanPresence = "Yes"
End If
End If
If (StrComp(protocol,"racadm") = 0) Then
racadmObject.setUserName(racadmParameterObj.getProtocolParameterValue("UserName"))
racadmObject.setPassword(racadmParameterObj.getProtocolParameterValue("Password"))
racadmObject.setPort(racadmParameterObj.getProtocolParameterValue("Port"))
racadmObject.setIPAddress(racadmParameterObj.getProtocolParameterValue("IPAddress"))
racadmObject.setCmdList(racadmCmdList)
racadmPresence = racadmObject.populateracadmDictionary
log.MOMDebugLog 1, "racadm presence returned is --" &amp; racadmPresence
End If
Next
'Compute the health of chassis components with component object list you got
Dim chassisModuleHealthObj
Set chassisModuleHealthObj = New chassisModulesHealth
If(StrComp(wsmanPresence,"Yes") = 0) Then
'Now use the Protocol Helper object to pass the list of DCIM classes
Set wsmanInvDataParser = New InventoryDataParser
wsmanInvDataParser.setComponentInventoryProfileHandle(wsmanInventoryProfileHandle)
wsmanInvDataParser.populateComponentObjects(profileInfoDict)
compObjectList = wsmanInvDataParser.getComponentObjects()

For Each Key in compDictKeys
log.MOMDebugLog 1, "Key value is" &amp; Key
profilePresence = profilesPresenceDict.Item(Key)
If (StrComp(profilePresence,"Yes") = 0 ) Then
If (StrComp(Key,"Storage") = 0) Then
log.MOMDebugLog 1, "Computing Chassis Storage health"
chassisModuleHealthObj.computeChassisStorageComponentsHealth(compObjectList)
End If
If (StrComp(Key,"Fan") = 0) Then
log.MOMDebugLog 1, "Computing Chassis Fan health"
chassisModuleHealthObj.computeChassisFanHealth(compObjectList)
End If

If (StrComp(Key,"PCIeDevice") = 0) Then
log.MOMDebugLog 1, "Computing Chassis PCIe Device health"
chassisModuleHealthObj.computeChassisPCIeHealth(compObjectList)
End If

If (StrComp(Key,"PowerSupply") = 0) Then
log.MOMDebugLog 1, "computing Power Supply health"
chassisModuleHealthObj.computeChassisPowerSupplyHealth(compObjectList)
End If

If(StrComp(Key, "IOModule") = 0) Then
log.MOMDebugLog 1, "computing IO Module health"
Call chassisModuleHealthObj.computeIOModuleHealth(compObjectList,racadmPresence)
End If

If (StrComp(Key,"CMCPSServiceTag") = 0) Then

log.MOMDebugLog 1, "Computing CMCGroup health"
Call chassisModuleHealthObj.computeChassisCMCGroupHealth(compObjectList,racadmPresence)

log.MOMDebugLog 1, "computing Power Supply group health"
Call chassisModuleHealthObj.computeChassisPowerSupplyGroupHealth(compObjectList,racadmPresence)

End If

End If
Next
End If
Set racadmDataParserObj = New racadmDataParser
racadmDataParserObj.setRacadmDictionary(racadmObject.getracadmDictionary)
racadmDataParserObj.populateracadmComponentObjects(profileInfoDict)
racadmcompObjList = racadmDataParserObj.getComponentObjects()
For Each racadmKey in racadmDictKeys
racadmprofilePresence = racadmProfilePresenceDict.Item(racadmKey)
If(StrComp(racadmprofilePresence, "Yes") = 0) Then
If(StrComp(racadmKey, "CMC") = 0) Then
log.MOMDebugLog 1, "computing Chassis Controller health"
Call chassisModuleHealthObj.computeChassisCMCHealth(racadmcompObjList,racadmPresence)
End If
If(StrComp(racadmKey, "IOModule") = 0) Then
'populate IO module profile dictionary
log.MOMDebugLog 1, "computing IO Module health"
Call chassisModuleHealthObj.computeIOModuleHealth(racadmcompObjList,racadmPresence)
End If
If(StrComp(racadmKey, "PowerSupplyGroup") = 0) Then
'populate power supply profile dictionary
log.MOMDebugLog 1, "computing Power Supply Group health"
Call chassisModuleHealthObj.computeChassisPowerSupplyGroupHealth(racadmcompObjList,racadmPresence)
End If
If(StrComp(racadmKey, "CMCGroup") = 0) Then
'populate cmc group profile dictionary
log.MOMDebugLog 1, "computing CMC Group health"
Call chassisModuleHealthObj.computeChassisCMCGroupHealth(racadmcompObjList, racadmPresence)
End If
End If
Next

chassisModuleHealthObj.submitPropertyBagItems
log.MOMDebugLog 1, "Submitted property bags for Dell Chassis components"
profDictReader.destroyCOMObjects()
Set profDictReader = Nothing
If Not wsmanInventoryProfileHandle Is Nothing Then
wsmanInventoryProfileHandle.RemoveAll
Set wsmanInventoryProfileHandle = Nothing
End If


If Not wsmanHelperOject Is Nothing Then
wsmanHelperOject.ClearProfileDictionary()
Set wsmanHelperOject = Nothing
End If

If Not profileInfoDict Is Nothing Then
profileInfoDict.RemoveAll
set profileInfoDict = Nothing
End If

If Not wsmanInvDataParser Is Nothing Then
wsmanInvDataParser.destroyCOMObjects()
Set wsmanInvDataParser = Nothing
End If

Dim compObj
Set chassisModuleHealthObj = Nothing
If TypeName(compObjectList) &lt;&gt; "Nothing" Then
For Each compObj In compObjectList
If Not compObj Is Nothing Then
compObj.destroyCOMObjects()
set compObj = Nothing
End If
Next
End If

Function ArrayCount(ByRef array)
Dim index, count
count = 0
For index = 0 To UBound(array)
count = count + 1
Next
ArrayCount = count
End Function

Public Function CheckProfilesPresenceFromDevice(ByRef profilesDictionary)
dim protocol, protocolHelperObject, protFactoryObj, presenceDictionary
protocol = "wsman"
Set protFactoryObj = New ProtocolFactory

Set protocolHelperObject = protFactoryObj.getProtocolHelperObject(protocol, protParameterObj)
protocolHelperObject.InputProfilesDictionary = profilesDictionary
Set presenceDictionary = protocolHelperObject.CheckProfilesPresence()
log.MOMDebugLog 1, "Received the Profile Dictionary from DellDeviceHelper."
Set CheckProfilesPresenceFromDevice = presenceDictionary
End Function

Class chassisModulesHealth
Dim m_momApiHelper
Dim className, componentHealthInstance, compObjListFilter
Dim unitList, unitObj

Private Sub Class_Initialize
Set m_momApiHelper = New MOMAPIHelper
Call m_momApiHelper.CreateMOMScriptAPI()
End Sub

Public Function submitPropertyBagItems
Call m_momApiHelper.ReturnDataItems()
End Function

Public Function computeChassisFanHealth(ByRef compObjectList)
' Fan HealthInstance
className = "Dell.Chassis.Fan"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Fan")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing

End Function


Public Function computeChassisPowerSupplyHealth(ByRef compObjectList)
' PowerSupply HealthInstance
className = "Dell.Chassis.PowerSupply"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.PowerSupply")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing

End Function

'This function will get the health of CMC , create and populate the health instance
'CASE-I If RACADM is present
' It uses RACADM dictionary to get Instance and its health
'CASE-II If RACADM is not present
' It Uses Unit Monitor Target to get instance Id and set warning in health
Public Function computeChassisCMCHealth(ByRef compObjectList, ByRef racadmPresence)
'CMC Unit monitor
className = "Dell.Chassis.cmc.racadm"
Set componentHealthInstance = creatorFactory.Item(className)
If StrComp(racadmPresence,"Yes") = 0 Then
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.cmc.racadm")
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitList, racadmPresence)
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing
Else
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, Nothing, racadmPresence)
End If

End Function

'This function will get the health of IO Module , create and populate the health instance
'CASE-I If RACADM is present
' It uses RACADM dictionary to get Instances and their health
'CASE-II If RACADM is not present
' It Uses WSMAN profile dictionay values to get instance Ids and then set warning to their health
Public Function computeIOModuleHealth(ByRef compObjectList, ByRef racadmPresence)
'IO Module Unit monitor
className = "Dell.Chassis.IO.Racadm"
Set componentHealthInstance = creatorFactory.Item(className)
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitList, racadmPresence)
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing
End Function

Public Function computeChassisPCIeHealth(ByRef compObjectList)
' PCIe HealthInstance
className = "Dell.Chassis.PCIeDevice"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.PCIeDevice")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing

End Function

'This function will get the health of PowerSupply Group , create and populate the health instance
'CASE-I If RACADM is present
' It uses RACADM dictionary to get Instance and its health
'CASE-II If RACADM is not present
' It Uses Unit Monitor Target to get instance Id and set warning in health
public Function computeChassisPowerSupplyGroupHealth(ByRef compObjectList, ByRef racadmPresence)
'PowerSupply Group Unit monitor
className = "Dell.Chassis.PowerSupplyGroup.racadm"
Set compObjListFilter = New ComponentObjectListFilter
If StrComp(racadmPresence,"Yes") = 0 Then
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, className)

If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj, racadmPresence)
Next
End If

compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing
Else
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "CMC.ServiceTag")
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitList, racadmPresence)
End If
End Function

'This function will get the health of CMC Group , create and populate the health instance
'CASE-I If RACADM is present
' It uses RACADM dictionary to get Instance and its health
'CASE-II If RACADM is not present
' It Uses Unit Monitor Target to get instance Id and set warning in health
Public Function computeChassisCMCGroupHealth(ByRef compObjectList, ByRef racadmPresence)
'CMC Unit monitor
className = "Dell.Chassis.CMCGroup.racadm"
Set compObjListFilter = New ComponentObjectListFilter
If StrComp(racadmPresence,"Yes") = 0 Then
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.cmc.racadm")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj, racadmPresence)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing
Else
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "CMC.ServiceTag")
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitList, racadmPresence)
End If
End Function

Public Function computeChassisStorageComponentsHealth(ByRef compObjectList)
'Storage Controller HealthInstance
className = "Dell.Chassis.Storage.Controller"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Storage.Controller")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing

'Storage Controller Battery HealthInstance
Dim contunitList, contbattunitlist, contbattunitlistItem, contunitListItem, contbattcompObjListFilter
ClassName = "Dell.Chassis.Storage.Controller.Battery"
Set compObjListFilter = New ComponentObjectListFilter
Set contbattcompObjListFilter = New ComponentObjectListFilter
contunitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Storage.Controller")
contbattunitlist = contbattcompObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Storage.Controller.Battery")
Dim contFQDD, contBatteryFQDD, contPrimarystatus
If ArrayCount(contbattunitlist) &gt; 0 Then
If ArrayCount(contunitList) &gt; 0 Then
For Each contbattunitlistItem In contbattunitlist
contBatteryFQDD = contbattunitlistItem.getAttributevalue("FQDD")
For Each contunitListItem In contunitList
contFQDD = contunitListItem.getAttributevalue("FQDD")
If InStr(contBatteryFQDD,contFQDD) Then
log.MOMDebugLog 1, "Controller Battery with FQDD--" &amp; contBatteryFQDD &amp; "---belongs to storage controller with FQDD---" &amp; contFQDD
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, contunitListItem, contbattunitlistItem)
End If
Next
Next
End If
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing
contbattcompObjListFilter.destroyCOMObjects()
Set contbattcompObjListFilter = Nothing

'Enclosure HealthInstance
className = "Dell.Chassis.Storage.Controller.Enclosure"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Storage.Controller.Enclosure")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing

'VirtualDisk HealthInstance
className = "Dell.Chassis.Storage.Controller.VirtualDisk"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Storage.Controller.VirtualDisk")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing

'PhysicalDisk PrimaryStatus Health
className = "Dell.Chassis.Storage.Controller.PhysicalDisk.PrimaryStatus"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Storage.Controller.PhysicalDisk")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing

'PhysicalDisk PredictiveFailure Health
className = "Dell.Chassis.Storage.Controller.PhysicalDisk.PredictiveFailure"
Set compObjListFilter = New ComponentObjectListFilter
unitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Chassis.Storage.Controller.PhysicalDisk")
If ArrayCount(unitList) &gt; 0 Then
For Each unitObj In unitList
Set componentHealthInstance = creatorFactory.Item(className)
Call componentHealthInstance.CreateAndPopulateHealthInstance(m_momApiHelper, unitObj)
Next
End If
compObjListFilter.destroyCOMObjects()
Set compObjListFilter = Nothing


End Function

End Class


Class racadmDictionaryCreator
Private m_Username
Private m_Password
Private m_IPAddress
Private m_Port
Private m_cmdlist
Private m_racadmDictionary
Private strRacadmFileOutput
Private ForReading

Private Sub Class_Initialize
Set m_racadmDictionary = CreateObject("Scripting.Dictionary")
m_racadmDictionary.CompareMode = vbTextCompare
ForReading = 1
End Sub

Public Function setUserName(ByRef userName)
m_UserName = userName
End Function

Public Function setPassword(ByRef Password)
m_Password = Password
End Function

Public Function setPort(ByRef Port)
m_Port = Port
End Function

Public Function setIPAddress(ByRef IPAddress)
m_IPAddress = IPAddress
End Function

Public Function setCmdList(ByRef cmdList)
m_cmdlist = cmdList
End Function

Public Function getracadmDictionary
Set getracadmDictionary = m_racadmDictionary
End Function


Private Function AddCommandDictionary(ByRef Key, ByRef Val)
m_racadmDictionary.Add Key, Val
End Function

Private Function bFileExists(ByRef filespec1)
'On Error Resume Next
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
bFileExists = (fso.FileExists(filespec1))
Set fso = Nothing
End Function

Private Function VerifyInstallPath(ByRef path)
On Error Resume Next
Dim installPath

installPath = path &amp; "\racadm.exe"
If (bFileExists(installPath)) Then
VerifyInstallPath = True
else
VerifyInstallPath = False
End If
End Function

Private Function GetPathFromRegistry(ByVal strRacadmKey, ByRef installPath)
On Error Resume Next
Dim oShell, pathFromRegistry, newInstallPath

pathFromRegistry = ""
Set oShell = CreateObject ("WScript.Shell")
pathFromRegistry = oShell.RegRead(strRacadmKey)

'Appending 5 to the path since the RACADM executable was placed under the RAC5 directory from OM 6.1
newInstallPath = pathFromRegistry &amp; "5"
If pathFromRegistry &lt;&gt; "" Then
If (VerifyInstallPath(pathFromRegistry) = True) Then
installPath = pathFromRegistry
GetPathFromRegistry = True
ElseIf (VerifyInstallPath(newInstallPath) = True) Then
installPath = newInstallPath
GetPathFromRegistry = True
Else
GetPathFromRegistry = False
End If
Else
GetPathFromRegistry = False
If Err &lt;&gt; 0 Then
Wscript.Echo "RACADM Registry is empty for Key :" &amp; strRacadmKey
Err.Clear
End If
End If
Set oShell = Nothing
End Function

Private Function GetRACADMInstallPath(ByVal RACADM32RegistryKey, ByVal RACADM64RegistryKey, ByRef o_sPath)
On Error Resume Next

Dim installPath
installPath = ""
If (GetPathFromRegistry (RACADM32RegistryKey, installPath) = True) Then
o_sPath = installPath
GetRACADMInstallPath = True
log.MOMDebugLog 1, "Got RACADM path from RACADM 32 bit Registry Key entry : " &amp; installPath

ElseIf (GetPathFromRegistry (RACADM64RegistryKey, installPath) = True) Then
o_sPath = installPath
GetRACADMInstallPath = True
log.MOMDebugLog 1, "Got RACADM path from RACADM 64 bit Registry Key entry : " &amp; installPath

Else
GetRACADMInstallPath = False
log.MOMDebugLog 1, "Unable to get RACADM path for Registry Entries"

End If

If Err &lt;&gt; 0 Then
GetRACADMInstallPath = Err.Number
Err.Clear
End If

On Error Goto 0
End Function

Private Function GetRACADMPath(ByRef o_sPath)
On Error Resume Next

'Registry Entry for 32 and 64 bit OMSA RACADM Path
Const RACADM_REG_INSTALL_PATH = "HKEY_LOCAL_MACHINE\SOFTWARE\Dell Computer Corporation\OpenManage\Remote Access Card Managed Node\PATH"
Const RACADM64_REG_INTALL_PATH = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\Dell Computer Corporation\OpenManage\Remote Access Card Managed Node\PATH"
'Registry Entry for 32 and 64 bit DRAC Tools RACADM Path
Const REM_RACADM_REG_INTALL_PATH = "HKEY_LOCAL_MACHINE\SOFTWARE\Dell Computer Corporation\OpenManage\Remote Access Card Management Station\Path"
Const REM_RACADM64_REG_INTALL_PATH = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Dell Computer Corporation\OpenManage\Remote Access Card Management Station\Path"

'Default Location having RACADM executable for OMSA and Drac Tools
Const DEF_RACADM_PATH = "C:\Program Files\Dell\SysMgt\rac5"

Dim installerPath
installerPath = ""

If (GetRACADMInstallPath (RACADM_REG_INSTALL_PATH, RACADM64_REG_INTALL_PATH, installerPath) = True) Then
o_sPath = installerPath
log.MOMDebugLog 1, "Got RACADM path from OMSA"

ElseIf (GetRACADMInstallPath (REM_RACADM_REG_INTALL_PATH, REM_RACADM64_REG_INTALL_PATH, installerPath) = True) Then
o_sPath = installerPath
log.MOMDebugLog 1, "Got RACADM path from DRAC TOOLS"

ElseIf (VerifyInstallPath(DEF_RACADM_PATH) = True) Then
o_sPath = DEF_RACADM_PATH
log.MOMDebugLog 1, "Got RACADM path using the Default RACADM path : " &amp; DEF_RACADM_PATH

Else
log.MOMDebugLog 1, "Did Not Get RACADM Path from either OMSA or DRAC Tools"

End If

If Err &lt;&gt; 0 Then
GetRACADMPath = Err.Number
Err.Clear
End If
End Function
'*****************************************************************
'DelFile
'Routine to delete the OMSA Report file
'*****************************************************************
Function DelFile(ByVal filespec2)
On Error Resume Next
Dim fso, oFile
If bFileExists(filespec2) Then
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile filespec2, True
Set fso = Nothing
End If
If Err &lt;&gt; 0 Then
DelFile = Err.Number
Err.Clear
End If
On Error Goto 0
End Function

Private Function ExecuteQuery(ByRef cmd)
dim wsShell : Set wsShell = Createobject("WScript.Shell")
dim wshSysEnv : Set wshSysEnv = wsShell.Environment
dim tFolder : tFolder = wshSysEnv("TEMP")
dim wshPrcEnv : Set wshPrcEnv = wsShell.Environment("Process")
tFolder = Replace(tFolder, "%SystemRoot%", wshPrcEnv("SYSTEMROOT"), 1, -1, vbTextCompare)
Dim TypeLib, NewGUID, fileGuid, strCommand, oShell, rc, racadmPath, timeout, RunRemoteCmd
Set TypeLib = CreateObject("Scriptlet.TypeLib")
NewGUID = TypeLib.Guid
fileGuid= (left(NewGUID, len(NewGUID)-2))
GetRACADMPath racadmPath
strRacadmFileOutput = tFolder &amp; "\Dell_ChassisDetailed_" &amp; fileGuid &amp; ".txt"
'strCommand = "cmd /C " &amp; chr(34) &amp; racadmPath &amp; "\" &amp; "racadm.exe" &amp; Chr(34) &amp; " -r " &amp; IPAddress &amp; ":" &amp; racadmPort &amp; " -u " &amp; username &amp; " -p " &amp; password &amp; " " &amp; cmd &amp; " &gt; " &amp; strRacadmFileOutput
strCommand = "cmd /C " &amp; chr(34) &amp; racadmPath &amp; "\" &amp; "racadm.exe" &amp; Chr(34) &amp; " -r " &amp; m_IPAddress &amp; ":" &amp; m_Port &amp; " -u " &amp; m_Username &amp; " -p " &amp; m_Password &amp; " " &amp; cmd &amp; " &gt; " &amp; strRacadmFileOutput
Set oShell = CreateObject ("WScript.Shell")
rc = oShell.run (strCommand,0,true)
WScript.Sleep(1000)
if(rc = 0) Then
log.MOMDebugLog 1, "racadm for command--" &amp; cmd &amp; " is successful"
ExecuteQuery = "Successful"
else
log.MOMDebugLog 1, "RunRemoteCMD error: " &amp; cmd
DelFile(strRacadmFileOutput)
ExecuteQuery = "NotSuccessful"
End If
End Function

'*****************************************************************
'RemoveWhiteSpaces
'Routine to
'*****************************************************************
Function RemoveWhiteSpace(ByVal strText)
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = "\s\s+"
'RegEx.MultistrLine = True
RegEx.Global = True
strText = RegEx.Replace(strText,"#")
RemoveWhiteSpace = strText
End Function

'*****************************************************************
'Removes whitespaces from the String(strLine) and then excecute regular
'expression to get headers list
'*****************************************************************
Function GetHeadersList(ByVal strLine, ByRef listOfHeaders)
Dim regExHeader
Set regExHeader = New RegExp
regExHeader.Pattern = "&lt;(\w*\s*){1,}&gt;"
regExHeader.IgnoreCase = vbTrue
regExHeader.Global = vbTrue
strLine = Trim(strLine)
strLine = RemoveWhiteSpace(strLine)
Set listOfHeaders = regExHeader.Execute(strLine)
GetHeadersList = strLine
End Function

Public Function populateracadmDictionary
Dim cmd, errcode
Dim i,j
Dim TempDict, TempKeys
Dim field
Dim objLogFSO1, oFile, strLine, LineItems, item, fdValue, header, listOfHeaders
Dim getmodinfoPresence,getpbinfoPresence,getpbInfoInstanceObj,chassisSVCTag
getmodinfoPresence = "No"
getpbinfoPresence = "No"
log.MOMDebugLog 1, "Creating racadm profile dictionary--"
For Each cmd in m_cmdlist
If (StrComp(cmd, "getmodinfo") = 0) Then
If(StrComp(ExecuteQuery(cmd),"Successful") = 0) Then
If Not bFileExists(strRacadmFileOutput) Then
log.MOMDebugLog 1, "strRacadmFileOutput does not exist - " &amp; strRacadmFileOutput
Else
Set objLogFSO1 = CreateObject("Scripting.FileSystemObject")
Set oFile = objLogFSO1.OpenTextFile(strRacadmFileOutput, ForReading, False)
Do While Not oFile.AtEndOfStream
strLine = Trim(oFile.ReadLine)
If Instr(Lcase(strLine),"error") Then
log.MOMDebugLog 1, " ERROR: Error in RemoteRacadm Output " &amp; strLine
Err.Clear
ElseIf Instr(LCase(strLine),Lcase("ERROR: Unable to")) Then
log.MOMDebugLog 1, " ERROR: LOGIN IP/PORT/CREDENTIAL issue: " &amp; strLine
ElseIf Instr(LCase(strLine),"&lt;") Then
strLine = GetHeadersList(strLine,listOfHeaders)
Set TempDict = CreateObject("Scripting.Dictionary")
TempDict.CompareMode = vbTextCompare
For Each header In listOfHeaders
TempDict.Add header.Value, "NA"
Next
TempKeys = TempDict.Keys
j = TempDict.Count
Dim getmodInstanceObj
Set getmodInstanceObj = New racadmCmdInstancesCreator
Do While Not oFile.AtEndOfStream
strLine = oFile.Readline
If ( (IsEmpty(strLine) &lt;&gt; True ) And (strLine &lt;&gt; "") )Then
strLine = Trim(strLine)
strLine = RemoveWhiteSpace(strLine)
LineItems = split(strLine,"#")
field = Lcase(LineItems(0))

If Instr(field,"chassis") Then
For i = 0 to (j-1)
If(Instr(LCASE(TempKeys(i)),"svctag")) Then
chassisSVCTag = LineItems(i)
log.MOMDebugLog 1, "Chassis SVCTag:" &amp; TempKeys(i) &amp; "Value:" &amp; LineItems(i)
End If
Next
End If
If Instr(field,"cmc") Then
getmodinfoPresence = "Yes"
Dim getmodInstanceCMCAttributes
Set getmodInstanceCMCAttributes = New racadmCmdInstanceAttributeCreator
log.MOMDebugLog 1, "getmodinfo Key value pairs for Controller are"
For i = 0 to (j-1)
If(Instr(LCASE(TempKeys(i)),"svctag")) Then
fdValue = chassisSVCTag
Else
fdValue = LineItems(i)
End If
log.MOMDebugLog 1, "Key:" &amp; TempKeys(i) &amp; "Value:" &amp; fdValue
Call getmodInstanceCMCAttributes.AddAttributeDictionary(TempKeys(i), fdValue)
Next
Call getmodInstanceObj.AddInstanceDictionary(field, getmodInstanceCMCAttributes)
End If


If Instr(field,"switch") Then
getmodinfoPresence = "Yes"
Dim getmodInstanceIOAttributes
Set getmodInstanceIOAttributes = New racadmCmdInstanceAttributeCreator
log.MOMDebugLog 1, "getmodinfo Key value pairs for IOModule are"
For i = 0 to (j-1)
log.MOMDebugLog 1, "Key:" &amp; TempKeys(i) &amp; "Value:" &amp; LineItems(i)
Call getmodInstanceIOAttributes.AddAttributeDictionary(TempKeys(i), LineItems(i))
Next
Call getmodInstanceObj.AddInstanceDictionary(field, getmodInstanceIOAttributes)
End If
End If
Loop
End If
Loop
oFile.close
'Clean up the CLI Output : Delete %WINTEMP% \ %Guid1% .txt
errcode = DelFile(strRacadmFileOutput)
If errcode &lt;&gt; 0 Then
log.MOMDebugLog 1, " WARNING:! - DelFile error " &amp; strRacadmFileOutput
End If
End If
If( StrComp(getmodinfoPresence,"Yes") = 0) Then
log.MOMDebugLog 1, "racadm dictionary is populated with key as---" &amp; cmd
Call AddCommandDictionary(cmd,getmodInstanceObj)
End If
End If
End If
If (StrComp(cmd, "getpbinfo") = 0) Then
If(StrComp(ExecuteQuery(cmd),"Successful") = 0) Then
DIm pgrpAttrDict
Set pgrpAttrDict = CreateObject("Scripting.Dictionary")
pgrpAttrDict.CompareMode = vbTextCompare
If Not bFileExists(strRacadmFileOutput) Then
log.MOMDebugLog 1, "strRacadmFileOutput does not exist - " &amp; strRacadmFileOutput
Else
Set objLogFSO1 = CreateObject("Scripting.FileSystemObject")
Set oFile = objLogFSO1.OpenTextFile(strRacadmFileOutput, ForReading, False)

Do While Not oFile.AtEndOfStream
strLine = Trim(oFile.ReadLine)
If ( (IsEmpty(strLine) &lt;&gt; True ) And (strLine &lt;&gt; "") ) Then
If Instr(Lcase(strLine),"error") Then
log.MOMDebugLog 1, " ERROR: Error in RemoteRacadm Output " &amp; strLine
Err.Clear
ElseIf Instr(LCase(strLine),Lcase("ERROR: Unable to")) Then
log.MOMDebugLog 1, " ERROR: LOGIN IP/PORT/CREDENTIAL issue: " &amp; strLine
Else
if(Not (pgrpAttrDict.Exists("ID"))) Then
pgrpAttrDict.Add "ID",chassisSVCTag
end if
IF( Instr(Lcase(strLine),"overall power health")) Then
getpbinfoPresence = "Yes"
Dim fieldValue
LineItems = split(strLine,"=")
log.MOMDebugLog 1, "string line " &amp; strLine
field = Replace(Lcase(LineItems(0))," ","")
fieldValue =Trim(LineItems(1))
log.MOMDebugLog 1, "field is " &amp; field
log.MOMDebugLog 1, "Value is " &amp; fieldValue
pgrpAttrDict.Add field,fieldValue

End If
IF( Instr(Lcase(strLine),"redundancy") ) Then

log.MOMDebugLog 1, "string line " &amp; strLine
LineItems = split(strLine,"=")
if(Trim(Lcase(LineItems(0))) = "redundancy") then
Dim fieldValue2
field = Replace(Lcase(LineItems(0))," ","")
fieldValue2 = Trim(LineItems(1))
log.MOMDebugLog 1, "field is " &amp; field
log.MOMDebugLog 1, "Value is " &amp; fieldValue2
pgrpAttrDict.Add field, fieldValue2
END IF
EnD If
END iF
End If
Loop
oFile.close
'Clean up the CLI Output : Delete %WINTEMP% \ %Guid1% .txt
errcode = DelFile(strRacadmFileOutput)
If errcode &lt;&gt; 0 Then
log.MOMDebugLog 1, " WARNING:! - DelFile error " &amp; strRacadmFileOutput
End If
End If
If( StrComp(getpbinfoPresence,"Yes") = 0) Then
log.MOMDebugLog 1, "getpbinfo presence racadm dictionary is populated with key as---" &amp; cmd
Set getpbInfoInstanceObj = New racadmCmdInstancesCreator
Dim powerSupplyReqAttKeys, attriName, getpbinfoInstanceAttributes

powerSupplyReqAttKeys = pgrpAttrDict.Keys
Set getpbinfoInstanceAttributes = New racadmCmdInstanceAttributeCreator
For Each attriName in powerSupplyReqAttKeys

log.MOMDebugLog 1, "Key:" &amp; attriName &amp; "Value:" &amp; pgrpAttrDict(attriName)
Call getpbinfoInstanceAttributes.AddAttributeDictionary(attriName, pgrpAttrDict(attriName))
Next
Call getpbInfoInstanceObj.AddInstanceDictionary("PowerSupplyGroup",getpbinfoInstanceAttributes)

Call AddCommandDictionary(cmd,getpbInfoInstanceObj)
End If
End If
End If
Next
If ( StrComp(getmodinfoPresence,"Yes") = 0 AND StrComp(getpbinfoPresence,"Yes") = 0 ) Then
populateracadmDictionary = "Yes"
else
populateracadmDictionary = "No"
End If
End Function

Public Function IsRacadmPresent()
Dim getPath,returnVal
returnVal = "No"
getPath = ""
GetRACADMPath getPath
If getPath &lt;&gt; "" THEN
returnVal = "Yes"
END If
IsRacadmPresent = returnVal
End Function
End Class
'#################################################################################################################################
</ChassisStorageHealth>
</DataSource>
<ConditionDetection ID="OperationStatusSuccess" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='ComponentType']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/ComponentType$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='InstanceIndex']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/InstanceIndex$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='Status']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">OK</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection ID="OperationStatusWarning" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='ComponentType']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/ComponentType$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='InstanceIndex']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/InstanceIndex$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='Status']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Warning</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection ID="OperationStatusError" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='ComponentType']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/ComponentType$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='InstanceIndex']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/InstanceIndex$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='Status']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Error</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Success">
<Node ID="OperationStatusSuccess">
<Node ID="PBP"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="Warning">
<Node ID="OperationStatusWarning">
<Node ID="PBP"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="Error">
<Node ID="OperationStatusError">
<Node ID="PBP"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>