Function getRemoteSetting()
Dim Port, Encoding, SkipCACheck, SkipCNCheck, Timeout
If DebugScript = False Then
Port = "$Target/Property[Type='OOB!Microsoft.SystemCenter.OOB.WSManDevice']/Port$"
Encoding = "$Target/Property[Type='OOB!Microsoft.SystemCenter.OOB.WSManDevice']/Encoding$"
SkipCACheck = "$Target/Property[Type='OOB!Microsoft.SystemCenter.OOB.WSManDevice']/SkipCACheck$"
SkipCNCheck = "$Target/Property[Type='OOB!Microsoft.SystemCenter.OOB.WSManDevice']/SkipCNCheck$"
Timeout = "$Target/Property[Type='OOB!Microsoft.SystemCenter.OOB.WSManDevice']/Timeout$"
Else
Port = "443"
Encoding = "UTF-8"
SkipCACheck = "True"
SkipCNCheck = "True"
Timeout = "300"
End If
getRemoteSetting = Port & ";" & Encoding & ";" & SkipCACheck & ";" & SkipCNCheck & ";" & Timeout
End Function
'#################################################################################################################################
</TemplateScriptConfiguration>
<ProfileDictionaryScript>
'#################################################################################################################################
'**************************************************************************************************
'ProfileDictionaryCreator code
'**************************************************************************************************
Class ProfileDictionaryCreator
Private profileInfoDict
Public ishostNIC
Public isPCIeSSDExtender
Public isPCIeSSDBackPlane
Public isPCIeSSDPhysicalDisk
Public generation
Private Sub Class_Initialize
Set profileInfoDict = CreateObject("Scripting.Dictionary")
profileInfoDict.CompareMode = vbTextCompare
End Sub
Public Function GetProfileDictionary()
Set GetProfileDictionary = profileInfoDict
End Function
Public Function PopulateProfileDictionary()
Dim Dell_Server_Obj
Set Dell_Server_Obj = New ProfileInformation
Dell_Server_Obj.setProfileName("Dell.Server")
Dim Dell_Server_UID
Set Dell_Server_UID = New AttributeProperty
Dim Dell_Server_AvgCUPSUtilPerDay_Obj
Set Dell_Server_AvgCUPSUtilPerDay_Obj = New ProfileInformation
Dell_Server_AvgCUPSUtilPerDay_Obj.setProfileName("Dell.Server.AvgCUPSUtilizationPerDay")
Dim Dell_Server_Dell_Server_AvgCUPSUtilPerDay_ID
Set Dell_Server_Dell_Server_AvgCUPSUtilPerDay_ID = New AttributeProperty
Dell_Server_Dell_Server_AvgCUPSUtilPerDay_ID.setProtocol("wsman")
Dell_Server_Dell_Server_AvgCUPSUtilPerDay_ID.setClassName("cimv2/DCIM_AggregationMetricValue")
Dell_Server_Dell_Server_AvgCUPSUtilPerDay_ID.setProtocolAttributeName("InstanceID")
Dell_Server_AvgCUPSUtilPerDay_Obj.setAttributePropertyObject(Dell_Server_Dell_Server_AvgCUPSUtilPerDay_ID)
Dell_Server_AvgCUPSUtilPerDay_Obj.setAttributeDictionary("ID")
'Add IdracEnumeration for getting System LockDown Configuration Mode and Group Status
Dim Dell_Server_IdracEnumeration_Obj
Set Dell_Server_IdracEnumeration_Obj = New ProfileInformation
Dell_Server_IdracEnumeration_Obj.setProfileName("Dell.Server.IdracEnumeration")
Dim Dell_Server_IdracEnumeration_AttributeName
Set Dell_Server_IdracEnumeration_AttributeName = New AttributeProperty
Dim Dell_Server_ProcUnit_Obj
Set Dell_Server_ProcUnit_Obj = New ProfileInformation
Dell_Server_ProcUnit_Obj.setProfileName("Dell.Server.ProcUnit")
Dim Dell_Server_ProcUnit_DeviceID
Set Dell_Server_ProcUnit_DeviceID = New AttributeProperty
Dim Dell_Server_MemoryUnit_Obj
Set Dell_Server_MemoryUnit_Obj = New ProfileInformation
Dell_Server_MemoryUnit_Obj.setProfileName("Dell.Server.MemoryUnit")
Dim Dell_Server_MemoryUnit_ID
Set Dell_Server_MemoryUnit_ID = New AttributeProperty
'Adding License to profileInfoDict
Dim Dell_Server_License_Obj
Set Dell_Server_License_Obj = New ProfileInformation
Dell_Server_License_Obj.setProfileName("Dell.Server.License")
Dim Dell_Server_License_InstanceID
Set Dell_Server_License_InstanceID = New AttributeProperty
Dell_Server_License_InstanceID.setProtocol("wsman")
Dell_Server_License_InstanceID.setClassName("cimv2/DCIM_License")
Dell_Server_License_InstanceID.setProtocolAttributeName("InstanceID")
Dell_Server_License_Obj.setAttributePropertyObject(Dell_Server_License_InstanceID)
Dell_Server_License_Obj.setAttributeDictionary("ID")
Dim Dell_Server_License_LicenseDescription
Set Dell_Server_License_LicenseDescription = New AttributeProperty
Dell_Server_License_LicenseDescription.setProtocol("wsman")
Dell_Server_License_LicenseDescription.setClassName("cimv2/DCIM_License")
Dell_Server_License_LicenseDescription.setProtocolAttributeName("LicenseDescription")
Dell_Server_License_Obj.setAttributePropertyObject(Dell_Server_License_LicenseDescription)
Dell_Server_License_Obj.setAttributeDictionary("DisplayName")
Dim Dell_Server_License_LicenseType
Set Dell_Server_License_LicenseType = New AttributeProperty
Dell_Server_License_LicenseType.setProtocol("wsman")
Dell_Server_License_LicenseType.setClassName("cimv2/DCIM_License")
Dell_Server_License_LicenseType.setAttributeValueMappingObject()
Dell_Server_License_LicenseType.setAttributeValueMapping "1","Perpetual"
Dell_Server_License_LicenseType.setAttributeValueMapping "2","Leased"
Dell_Server_License_LicenseType.setAttributeValueMapping "3","Evaluation"
Dell_Server_License_LicenseType.setAttributeValueMapping "4","Site"
Dell_Server_License_Obj.setAttributePropertyObject(Dell_Server_License_LicenseType)
Dell_Server_License_Obj.setAttributeDictionary("LicenseType")
Dim Dell_Server_License_LicenseInstallDate
Set Dell_Server_License_LicenseInstallDate = New AttributeProperty
Dell_Server_License_LicenseInstallDate.setProtocol("wsman")
Dell_Server_License_LicenseInstallDate.setClassName("cimv2/DCIM_License")
Dell_Server_License_LicenseInstallDate.setProtocolAttributeName("LicenseInstallDate")
Dell_Server_License_Obj.setAttributePropertyObject(Dell_Server_License_LicenseInstallDate)
Dell_Server_License_Obj.setAttributeDictionary("LicenseInstallDate")
Dim Dell_Server_License_LicenseSoldDate
Set Dell_Server_License_LicenseSoldDate = New AttributeProperty
Dell_Server_License_LicenseSoldDate.setProtocol("wsman")
Dell_Server_License_LicenseSoldDate.setClassName("cimv2/DCIM_License")
Dell_Server_License_LicenseSoldDate.setProtocolAttributeName("LicenseSoldDate")
Dell_Server_License_Obj.setAttributePropertyObject(Dell_Server_License_LicenseSoldDate)
Dell_Server_License_Obj.setAttributeDictionary("LicenseSoldDate")
'Adding SDCard to profileInfoDict
Dim Dell_Server_SDCard_Obj
Set Dell_Server_SDCard_Obj = New ProfileInformation
Dell_Server_SDCard_Obj.setProfileName("Dell.Server.SDCard")
Dim Dell_Server_SDCard_FQDD
Set Dell_Server_SDCard_FQDD = New AttributeProperty
Dell_Server_SDCard_FQDD.setProtocol("wsman")
Dell_Server_SDCard_FQDD.setClassName("cimv2/DCIM_VFlashView")
Dell_Server_SDCard_FQDD.setProtocolAttributeName("FQDD")
Dell_Server_SDCard_Obj.setAttributePropertyObject(Dell_Server_SDCard_FQDD)
Dell_Server_SDCard_Obj.setAttributeDictionary("ID")
Dim Dell_Server_SDCard_DeviceDescription
Set Dell_Server_SDCard_DeviceDescription = New AttributeProperty
Dell_Server_SDCard_DeviceDescription.setProtocol("wsman")
Dell_Server_SDCard_DeviceDescription.setClassName("cimv2/DCIM_VFlashView")
Dell_Server_SDCard_DeviceDescription.setProtocolAttributeName("DeviceDescription")
Dell_Server_SDCard_Obj.setAttributePropertyObject(Dell_Server_SDCard_DeviceDescription)
Dell_Server_SDCard_Obj.setAttributeDictionary("DisplayName")
Dim Dell_Server_SDCard_size
Set Dell_Server_SDCard_size = New AttributeProperty
Dell_Server_SDCard_size.setProtocol("wsman")
Dell_Server_SDCard_size.setClassName("cimv2/DCIM_VFlashView")
Dell_Server_SDCard_size.setProtocolAttributeName("Capacity")
Dell_Server_SDCard_Obj.setAttributePropertyObject(Dell_Server_SDCard_size)
Dell_Server_SDCard_Obj.setAttributeDictionary("Size")
Dim Dell_Server_SDCard_WriteProtected
Set Dell_Server_SDCard_WriteProtected = New AttributeProperty
Dell_Server_SDCard_WriteProtected.setProtocol("wsman")
Dell_Server_SDCard_WriteProtected.setClassName("cimv2/DCIM_VFlashView")
Dell_Server_SDCard_WriteProtected.setProtocolAttributeName("WriteProtected")
Dell_Server_SDCard_Obj.setAttributePropertyObject(Dell_Server_SDCard_WriteProtected)
Dell_Server_SDCard_Obj.setAttributeDictionary("WriteProtected")
Dim Dell_Server_PSUnit_Obj
Set Dell_Server_PSUnit_Obj = New ProfileInformation
Dell_Server_PSUnit_Obj.setProfileName("Dell.Server.PSUnit")
Dim Dell_Server_PSUnit_ID
Set Dell_Server_PSUnit_ID = New AttributeProperty
Dell_Server_PSUnit_ID.setProtocol("wsman")
Dell_Server_PSUnit_ID.setClassName("cimv2/DCIM_PowerSupplyView")
Dell_Server_PSUnit_ID.setProtocolAttributeName("FQDD")
Dell_Server_PSUnit_Obj.setAttributePropertyObject(Dell_Server_PSUnit_ID)
Dell_Server_PSUnit_Obj.setAttributeDictionary("ID")
Dim Dell_Server_PSUnit_DetailedState
Set Dell_Server_PSUnit_DetailedState = New AttributeProperty
Dell_Server_PSUnit_DetailedState.setProtocol("wsman")
Dell_Server_PSUnit_DetailedState.setClassName("cimv2/DCIM_PowerSupplyView")
Dell_Server_PSUnit_Obj.setAttributePropertyObject(Dell_Server_PSUnit_DetailedState)
Dell_Server_PSUnit_Obj.setAttributeDictionary("DetailedState")
Dim Dell_Server_PSUnit_TotalOutputPower
Set Dell_Server_PSUnit_TotalOutputPower = New AttributeProperty
Dell_Server_PSUnit_TotalOutputPower.setProtocol("wsman")
Dell_Server_PSUnit_TotalOutputPower.setClassName("cimv2/DCIM_PowerSupplyView")
Dell_Server_PSUnit_Obj.setAttributePropertyObject(Dell_Server_PSUnit_TotalOutputPower)
Dell_Server_PSUnit_Obj.setAttributeDictionary("TotalOutputPower")
Dim Dell_Server_PSUnit_IsSwitchingSupply
Set Dell_Server_PSUnit_IsSwitchingSupply = New AttributeProperty
Dim Dell_Server_BIOS_Obj
Set Dell_Server_BIOS_Obj = New ProfileInformation
Dell_Server_BIOS_Obj.setProfileName("Dell.Server.BIOS")
Dim Dell_Server_BIOS_Name
Set Dell_Server_BIOS_Name = New AttributeProperty
Dim DellSoftwareIdentityObj
Set DellSoftwareIdentityObj = New ProfileInformation
DellSoftwareIdentityObj.setProfileName("Dell.SoftwareIdentity")
Dim DellSoftwareIdentity_ComponentType
Set DellSoftwareIdentity_ComponentType = New AttributeProperty
Dim Dell_Server_iDRAC_Obj
Set Dell_Server_iDRAC_Obj = New ProfileInformation
Dell_Server_iDRAC_Obj.setProfileName("Dell.Server.iDRAC")
Dim Dell_Server_iDRAC_ID
Set Dell_Server_iDRAC_ID = New AttributeProperty
Dim iDRACNicEnabledtmp,discoveryPreCheckerObjtmp
Set discoveryPreCheckerObjtmp = New DiscoveryPreChecker
iDRACNicEnabledtmp = discoveryPreCheckerObjtmp.isiDRACNicEnableFlagSet()
log.MOMDebugLog 1, "isiDRACNicEnableFlag before Query value is: " & iDRACNicEnabledtmp
Set discoveryPreCheckerObjtmp = Nothing
'If (InStr(modelType,"R930") = 0) Then
If iDRACNicEnabledtmp = True Then
Dim DellIdracCardStringObj
Set DellIdracCardStringObj = New ProfileInformation
DellIdracCardStringObj.setProfileName("Dell.IdracCardString")
Dim DellIdracCardString_AttributeName
Set DellIdracCardString_AttributeName = New AttributeProperty
Dim DellIdracCardEnumerationObj
Set DellIdracCardEnumerationObj = New ProfileInformation
DellIdracCardEnumerationObj.setProfileName("Dell.IdracCardEnumeration")
Dim DellIdracCardEnumeration_AttributeName
Set DellIdracCardEnumeration_AttributeName = New AttributeProperty
DellIdracCardEnumerationObj.populateProfileClassNameList()
profileInfoDict.Add "Dell.IdracCardEnumeration",DellIdracCardEnumerationObj
End If
Dim Dell_Server_NetworkInterfaceUnit_Obj
Set Dell_Server_NetworkInterfaceUnit_Obj = New ProfileInformation
Dell_Server_NetworkInterfaceUnit_Obj.setProfileName("Dell.Server.NetworkInterfaceUnit")
Dim Dell_Server_NetworkInterfaceUnit_ID
Set Dell_Server_NetworkInterfaceUnit_ID = New AttributeProperty
Dim Dell_Server_NICDetails_Obj
Set Dell_Server_NICDetails_Obj = New ProfileInformation
Dell_Server_NICDetails_Obj.setProfileName("Dell.Server.NICDetails")
Dim Dell_Server_NICDetails_VirtualMACAddress
Set Dell_Server_NICDetails_VirtualMACAddress= New AttributeProperty
Dim Dell_Server_NetworkInterfaceUnit_Capabilities_Obj
Set Dell_Server_NetworkInterfaceUnit_Capabilities_Obj = New ProfileInformation
Dell_Server_NetworkInterfaceUnit_Capabilities_Obj.setProfileName("Dell.Server.NetworkInterfaceUnit.Capabilities")
Dim Dell_Server_NetworkInterfaceUnitCapabilities_ID
Set Dell_Server_NetworkInterfaceUnitCapabilities_ID = New AttributeProperty
'DCIM_SwitchConnectionView,DCIM_PresenceAndStatusSensor are available only for Server Generation > 13
If generation > 13 Then
'Add Switchconnection ID and Port
Dim Dell_NIC_SwitchConnection_Obj
Set Dell_NIC_SwitchConnection_Obj = New ProfileInformation
Dell_NIC_SwitchConnection_Obj.setProfileName("Dell.NIC.Switchconnection")
Dim Dell_NIC_SwitchConnection_FQDD
Set Dell_NIC_SwitchConnection_FQDD = New AttributeProperty
Dell_NIC_SwitchConnection_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.NIC.Switchconnection",Dell_NIC_SwitchConnection_Obj
End If
If generation > 12 Then
Dim Dell_PresenceAndStatusSensor_Obj
Set Dell_PresenceAndStatusSensor_Obj = New ProfileInformation
Dell_PresenceAndStatusSensor_Obj.setProfileName("Dell.Server.PresenceAndStatusSensor")
Dim Dell_PNS_DeviceID
Set Dell_PNS_DeviceID = New AttributeProperty
Dell_PresenceAndStatusSensor_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Server.PresenceAndStatusSensor",Dell_PresenceAndStatusSensor_Obj
End If
Dim DellNumericSensorObj
Set DellNumericSensorObj = New ProfileInformation
DellNumericSensorObj.setProfileName("Dell.NumericSensor")
Dim DellNumericSensor_SensorType
Set DellNumericSensor_SensorType = New AttributeProperty
Dim DellSensorObj
Set DellSensorObj = New ProfileInformation
DellSensorObj.setProfileName("Dell.Sensor")
Dim DellSensor_SensorType
Set DellSensor_SensorType = New AttributeProperty
Dim Dell_Server_Storage_Controller_Obj
Set Dell_Server_Storage_Controller_Obj = New ProfileInformation
Dell_Server_Storage_Controller_Obj.setProfileName("Dell.Server.Storage.Controller")
Dim Dell_Server_Storage_Controller_DeviceID
Set Dell_Server_Storage_Controller_DeviceID = New AttributeProperty
Dell_Server_Storage_Controller_CachecadeCapability.setAttributeValueMapping "0","Cachecade Virtual Disk not supported"
Dell_Server_Storage_Controller_CachecadeCapability.setAttributeValueMapping "1","Cachecade Virtual Disk supported"
Dell_Server_Storage_Controller_Obj.setAttributePropertyObject(Dell_Server_Storage_Controller_CachecadeCapability)
Dell_Server_Storage_Controller_Obj.setAttributeDictionary("CachecadeCapability")
Dim Dell_Server_Storage_Controller_SlicedVDCapability
Set Dell_Server_Storage_Controller_SlicedVDCapability = New AttributeProperty
Dell_Server_Storage_Controller_SlicedVDCapability.setAttributeValueMapping "0","Sliced Virtual Disk creation not supported"
Dell_Server_Storage_Controller_SlicedVDCapability.setAttributeValueMapping "1","Sliced Virtual Disk creation supported"
Dell_Server_Storage_Controller_Obj.setAttributePropertyObject(Dell_Server_Storage_Controller_SlicedVDCapability)
Dell_Server_Storage_Controller_Obj.setAttributeDictionary("SlicedVDCapability")
Dim Dell_Server_Storage_Controller_CacheSizeInMB
Set Dell_Server_Storage_Controller_CacheSizeInMB = New AttributeProperty
Dim Dell_Server_Storage_Controller_Battery_Obj
Set Dell_Server_Storage_Controller_Battery_Obj = New ProfileInformation
Dell_Server_Storage_Controller_Battery_Obj.setProfileName("Dell.Server.Storage.Controller.Battery")
Dim Dell_Server_Storage_Controller_Battery_ID
Set Dell_Server_Storage_Controller_Battery_ID = New AttributeProperty
Dim Dell_Server_Storage_Controller_VirtualDisk_Obj
Set Dell_Server_Storage_Controller_VirtualDisk_Obj = New ProfileInformation
Dell_Server_Storage_Controller_VirtualDisk_Obj.setProfileName("Dell.Server.Storage.Controller.VirtualDisk")
Dim Dell_Server_Storage_Controller_VirtualDisk_ID
Set Dell_Server_Storage_Controller_VirtualDisk_ID = New AttributeProperty
Dim Dell_Server_Storage_Controller_VirtualDisk_StripeElementSize
Set Dell_Server_Storage_Controller_VirtualDisk_StripeElementSize = New AttributeProperty
Dim Dell_Server_Storage_Controller_InternalPhysicalDisk_Obj
Set Dell_Server_Storage_Controller_InternalPhysicalDisk_Obj = New ProfileInformation
Dell_Server_Storage_Controller_InternalPhysicalDisk_Obj.setProfileName("Dell.Server.Storage.Controller.PhysicalDisk")
Dim Dell_Server_Storage_Controller_PhysicalDisk_ID
Set Dell_Server_Storage_Controller_PhysicalDisk_ID = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_UsedRaidDiskSpace
Set Dell_Server_Storage_Controller_PhysicalDisk_UsedRaidDiskSpace = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_AvailableRaidDiskSpace
Set Dell_Server_Storage_Controller_PhysicalDisk_AvailableRaidDiskSpace = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_NegotiatedSpeed
Set Dell_Server_Storage_Controller_PhysicalDisk_NegotiatedSpeed = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_ManufactureWeek
Set Dell_Server_Storage_Controller_PhysicalDisk_ManufactureWeek = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_ManufactureYear
Set Dell_Server_Storage_Controller_PhysicalDisk_ManufactureYear = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_DriveFormFactor
Set Dell_Server_Storage_Controller_PhysicalDisk_DriveFormFactor = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_SupportedEncryptionTypes
Set Dell_Server_Storage_Controller_PhysicalDisk_SupportedEncryptionTypes = New AttributeProperty
'Adding Profile DCIM_RAIDEnumeration for getting NegotiatedSpeed Value
Dim Dell_Server_Storage_Controller_InternalPhysicalDisk_RAIDEnumeration_Obj
Set Dell_Server_Storage_Controller_InternalPhysicalDisk_RAIDEnumeration_Obj = New ProfileInformation
Dell_Server_Storage_Controller_InternalPhysicalDisk_RAIDEnumeration_Obj.setProfileName("Dell.Server.Storage.Controller.InternalPhysicalDisk.RAIDEnumeration")
Dim Dell_Server_Storage_Controller_PhysicalDisk_RAIDNegotiatedSpeed
Set Dell_Server_Storage_Controller_PhysicalDisk_RAIDNegotiatedSpeed = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_NegotiatedSpeed_val
Set Dell_Server_Storage_Controller_PhysicalDisk_NegotiatedSpeed_val = New AttributeProperty
Dim Dell_Server_Storage_Controller_PhysicalDisk_NegotiatedSpeed_FQDD
Set Dell_Server_Storage_Controller_PhysicalDisk_NegotiatedSpeed_FQDD = New AttributeProperty
Dim Dell_Server_Storage_Controller_Enclosure_Obj
Set Dell_Server_Storage_Controller_Enclosure_Obj = New ProfileInformation
Dell_Server_Storage_Controller_Enclosure_Obj.setProfileName("Dell.Server.Storage.Controller.Enclosure")
Dim Dell_Server_Storage_Controller_Enclosure_ID
Set Dell_Server_Storage_Controller_Enclosure_ID = New AttributeProperty
Dim Dell_Server_Storage_Controller_Enclosure_EMM_Obj
Set Dell_Server_Storage_Controller_Enclosure_EMM_Obj = New ProfileInformation
Dell_Server_Storage_Controller_Enclosure_EMM_Obj.setProfileName("Dell.Server.Storage.Controller.Enclosure.EMM")
Dim Dell_Server_Storage_Controller_Enclosure_EMM_ID
Set Dell_Server_Storage_Controller_Enclosure_EMM_ID = New AttributeProperty
Dim Dell_Server_Storage_Controller_Enclosure_EMM_FirmwareVersion
Set Dell_Server_Storage_Controller_Enclosure_EMM_FirmwareVersion = New AttributeProperty
Dim Dell_Server_Storage_Controller_Enclosure_FanSensor_Obj
Set Dell_Server_Storage_Controller_Enclosure_FanSensor_Obj = New ProfileInformation
Dell_Server_Storage_Controller_Enclosure_FanSensor_Obj.setProfileName("Dell.Server.Storage.Controller.Enclosure.FanSensor")
Dim Dell_Server_Storage_Controller_Enclosure_FanSensor_ID
Set Dell_Server_Storage_Controller_Enclosure_FanSensor_ID = New AttributeProperty
Dim Dell_Server_Storage_Controller_Enclosure_PowerSupply_Obj
Set Dell_Server_Storage_Controller_Enclosure_PowerSupply_Obj = New ProfileInformation
Dell_Server_Storage_Controller_Enclosure_PowerSupply_Obj.setProfileName("Dell.Server.Storage.Controller.Enclosure.PowerSupply")
Dim Dell_Server_Storage_Controller_Enclosure_PowerSupply_ID
Set Dell_Server_Storage_Controller_Enclosure_PowerSupply_ID = New AttributeProperty
Dim Dell_Server_Storage_Controller_Enclosure_PowerSupply_PartNumber
Set Dell_Server_Storage_Controller_Enclosure_PowerSupply_PartNumber = New AttributeProperty
Dim Dell_Server_Storage_Controller_Enclosure_TempSensor_Obj
Set Dell_Server_Storage_Controller_Enclosure_TempSensor_Obj = New ProfileInformation
Dell_Server_Storage_Controller_Enclosure_TempSensor_Obj.setProfileName("Dell.Server.Storage.Controller.Enclosure.TempSensor")
Dim Dell_Server_Storage_Controller_Enclosure_TempSensor_ID
Set Dell_Server_Storage_Controller_Enclosure_TempSensor_ID = New AttributeProperty
If ishostNIC = "True" Then
Dim Dell_Server_HostNIC_Obj
Set Dell_Server_HostNIC_Obj = New ProfileInformation
Dell_Server_HostNIC_Obj.setProfileName("Dell.Server.HostNIC")
Dim Dell_Server_HostNIC_InstanceID
Set Dell_Server_HostNIC_InstanceID = New AttributeProperty
Dell_Server_HostNIC_InstanceID.setProtocol("wsman")
Dell_Server_HostNIC_InstanceID.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_InstanceID.setProtocolAttributeName("InstanceID")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_InstanceID)
Dell_Server_HostNIC_Obj.setAttributeDictionary("InstanceID")
Dim Dell_Server_HostNIC_DisplayName
Set Dell_Server_HostNIC_DisplayName = New AttributeProperty
Dell_Server_HostNIC_DisplayName.setProtocol("wsman")
Dell_Server_HostNIC_DisplayName.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_DisplayName.setProtocolAttributeName("Name")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_DisplayName)
Dell_Server_HostNIC_Obj.setAttributeDictionary("displayName")
Dim Dell_Server_HostNIC_MACAddress
Set Dell_Server_HostNIC_MACAddress = New AttributeProperty
Dell_Server_HostNIC_MACAddress.setProtocol("wsman")
Dell_Server_HostNIC_MACAddress.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_MACAddress.setProtocolAttributeName("MACAddr")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_MACAddress)
Dell_Server_HostNIC_Obj.setAttributeDictionary("MACAddr")
Dim Dell_Server_HostNIC_DeviceDescription
Set Dell_Server_HostNIC_DeviceDescription = New AttributeProperty
Dell_Server_HostNIC_DeviceDescription.setProtocol("wsman")
Dell_Server_HostNIC_DeviceDescription.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_DeviceDescription.setProtocolAttributeName("DeviceDescription")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_DeviceDescription)
Dell_Server_HostNIC_Obj.setAttributeDictionary("DeviceDescription")
Dim Dell_Server_HostNIC_IPv4Address
Set Dell_Server_HostNIC_IPv4Address = New AttributeProperty
Dell_Server_HostNIC_IPv4Address.setProtocol("wsman")
Dell_Server_HostNIC_IPv4Address.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_IPv4Address.setProtocolAttributeName("IPv4Address")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_IPv4Address)
Dell_Server_HostNIC_Obj.setAttributeDictionary("IPv4Address")
Dim Dell_Server_HostNIC_IPv4SubnetMask
Set Dell_Server_HostNIC_IPv4SubnetMask = New AttributeProperty
Dell_Server_HostNIC_IPv4SubnetMask.setProtocol("wsman")
Dell_Server_HostNIC_IPv4SubnetMask.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_IPv4SubnetMask.setProtocolAttributeName("IPv4SubnetMask")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_IPv4SubnetMask)
Dell_Server_HostNIC_Obj.setAttributeDictionary("IPv4SubnetMask")
Dim Dell_Server_HostNIC_IPv6Address
Set Dell_Server_HostNIC_IPv6Address = New AttributeProperty
Dell_Server_HostNIC_IPv6Address.setProtocol("wsman")
Dell_Server_HostNIC_IPv6Address.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_IPv6Address.setProtocolAttributeName("IPv6Address")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_IPv6Address)
Dell_Server_HostNIC_Obj.setAttributeDictionary("IPv6Address")
Dim Dell_Server_HostNIC_IPv6Prefix
Set Dell_Server_HostNIC_IPv6Prefix = New AttributeProperty
Dell_Server_HostNIC_IPv6Prefix.setProtocol("wsman")
Dell_Server_HostNIC_IPv6Prefix.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_IPv6Prefix.setProtocolAttributeName("IPv6PrefixLength")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_IPv6Prefix)
Dell_Server_HostNIC_Obj.setAttributeDictionary("IPv6PrefixLength")
Dim Dell_Server_HostNIC_IPv6Gateway
Set Dell_Server_HostNIC_IPv6Gateway = New AttributeProperty
Dell_Server_HostNIC_IPv6Gateway.setProtocol("wsman")
Dell_Server_HostNIC_IPv6Gateway.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_IPv6Gateway.setProtocolAttributeName("IPv6Gateway")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_IPv6Gateway)
Dell_Server_HostNIC_Obj.setAttributeDictionary("IPv6Gateway")
Dim Dell_Server_HostNIC_IPv4Gateway
Set Dell_Server_HostNIC_IPv4Gateway = New AttributeProperty
Dell_Server_HostNIC_IPv4Gateway.setProtocol("wsman")
Dell_Server_HostNIC_IPv4Gateway.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_IPv4Gateway.setProtocolAttributeName("IPv4Gateway")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_IPv4Gateway)
Dell_Server_HostNIC_Obj.setAttributeDictionary("IPv4Gateway")
Dim Dell_Server_HostNIC_DeviceFQDD
Set Dell_Server_HostNIC_DeviceFQDD = New AttributeProperty
Dell_Server_HostNIC_DeviceFQDD.setProtocol("wsman")
Dell_Server_HostNIC_DeviceFQDD.setClassName("cimv2/DCIM_HostNetworkInterfaceView")
Dell_Server_HostNIC_DeviceFQDD.setProtocolAttributeName("DeviceFQDD")
Dell_Server_HostNIC_Obj.setAttributePropertyObject(Dell_Server_HostNIC_DeviceFQDD)
Dell_Server_HostNIC_Obj.setAttributeDictionary("DeviceFQDD")
Dell_Server_HostNIC_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Server.HostNIC",Dell_Server_HostNIC_Obj
End If
log.MOMDebugLog 1, "populateprofiledictionary isPCIeSSDExtender check " & isPCIeSSDExtender
if isPCIeSSDExtender = "True" Then
Dim Dell_Server_Extender_Obj
Set Dell_Server_Extender_Obj = New ProfileInformation
Dell_Server_Extender_Obj.setProfileName("Dell.Server.Storage.Extender")
Dim Dell_Server_Storage_Extender_InstanceID
Set Dell_Server_Storage_Extender_InstanceID = New AttributeProperty
Dell_Server_Storage_Extender_InstanceID.setProtocol("wsman")
Dell_Server_Storage_Extender_InstanceID.setClassName("cimv2/DCIM_PCIeSSDExtenderView")
Dell_Server_Storage_Extender_InstanceID.setProtocolAttributeName("InstanceID")
Dell_Server_Extender_Obj.setAttributePropertyObject(Dell_Server_Storage_Extender_InstanceID)
Dell_Server_Extender_Obj.setAttributeDictionary("ID")
End If
If isPCIeSSDBackPlane = "True" Then
Dim Dell_Server_Extender_BackPlane_Obj
Set Dell_Server_Extender_BackPlane_Obj = New ProfileInformation
Dell_Server_Extender_BackPlane_Obj.setProfileName("Dell.Server.Storage.Extender.BackPlane")
Dim Dell_Server_Storage_BackPlane_InstanceID
Set Dell_Server_Storage_BackPlane_InstanceID = New AttributeProperty
Dell_Server_Storage_BackPlane_InstanceID.setProtocol("wsman")
Dell_Server_Storage_BackPlane_InstanceID.setClassName("cimv2/DCIM_PCIeSSDBackPlaneView")
Dell_Server_Storage_BackPlane_InstanceID.setProtocolAttributeName("InstanceID")
Dell_Server_Extender_BackPlane_Obj.setAttributePropertyObject(Dell_Server_Storage_BackPlane_InstanceID)
Dell_Server_Extender_BackPlane_Obj.setAttributeDictionary("ID")
Dim Dell_Server_Storage_BackPlane_DisplayName
Set Dell_Server_Storage_BackPlane_DisplayName = New AttributeProperty
Dell_Server_Storage_BackPlane_DisplayName.setProtocol("wsman")
Dell_Server_Storage_BackPlane_DisplayName.setClassName("cimv2/DCIM_PCIeSSDBackPlaneView")
Dell_Server_Storage_BackPlane_DisplayName.setProtocolAttributeName("ProductName")
Dell_Server_Extender_BackPlane_Obj.setAttributePropertyObject(Dell_Server_Storage_BackPlane_DisplayName)
Dell_Server_Extender_BackPlane_Obj.setAttributeDictionary("DisplayName")
Dim Dell_Server_Storage_BackPlane_SlotCount
Set Dell_Server_Storage_BackPlane_SlotCount = New AttributeProperty
Dell_Server_Storage_BackPlane_SlotCount.setProtocol("wsman")
Dell_Server_Storage_BackPlane_SlotCount.setClassName("cimv2/DCIM_PCIeSSDBackPlaneView")
Dell_Server_Storage_BackPlane_SlotCount.setProtocolAttributeName("SlotCount")
Dell_Server_Extender_BackPlane_Obj.setAttributePropertyObject(Dell_Server_Storage_BackPlane_SlotCount)
Dell_Server_Extender_BackPlane_Obj.setAttributeDictionary("SlotCount")
Dim Dell_Server_Storage_BackPlane_FirmwareVersion
Set Dell_Server_Storage_BackPlane_FirmwareVersion = New AttributeProperty
Dell_Server_Storage_BackPlane_FirmwareVersion.setProtocol("wsman")
Dell_Server_Storage_BackPlane_FirmwareVersion.setClassName("cimv2/DCIM_PCIeSSDBackPlaneView")
Dell_Server_Storage_BackPlane_FirmwareVersion.setProtocolAttributeName("FirmwareVersion")
Dell_Server_Extender_BackPlane_Obj.setAttributePropertyObject(Dell_Server_Storage_BackPlane_FirmwareVersion)
Dell_Server_Extender_BackPlane_Obj.setAttributeDictionary("FirmwareVersion")
Dell_Server_Extender_BackPlane_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Server.Storage.Extender.BackPlane",Dell_Server_Extender_BackPlane_Obj
End If
If isPCIeSSDPhysicalDisk = "True" Then
Dim Dell_Server_Extender_PD_Obj
Set Dell_Server_Extender_PD_Obj = New ProfileInformation
Dell_Server_Extender_PD_Obj.setProfileName("Dell.Server.Storage.Extender.PhysicalDisk")
Dim Dell_Server_Storage_PD_InstanceID
Set Dell_Server_Storage_PD_InstanceID = New AttributeProperty
Dell_Server_Storage_PD_InstanceID.setProtocol("wsman")
Dell_Server_Storage_PD_InstanceID.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_InstanceID.setProtocolAttributeName("InstanceID")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_InstanceID)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("ID")
Dim Dell_Server_Storage_PD_Size
Set Dell_Server_Storage_PD_Size = New AttributeProperty
Dell_Server_Storage_PD_Size.setProtocol("wsman")
Dell_Server_Storage_PD_Size.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_Size.setProtocolAttributeName("SizeInBytes")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_Size)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("Size")
Dim Dell_Server_Storage_PD_Model
Set Dell_Server_Storage_PD_Model = New AttributeProperty
Dell_Server_Storage_PD_Model.setProtocol("wsman")
Dell_Server_Storage_PD_Model.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_Model.setProtocolAttributeName("Model")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_Model)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("Model")
Dim Dell_Server_Storage_PD_BusProtocol
Set Dell_Server_Storage_PD_BusProtocol = New AttributeProperty
Dim Dell_Server_Storage_PD_DeviceProtocol
Set Dell_Server_Storage_PD_DeviceProtocol = New AttributeProperty
Dell_Server_Storage_PD_DeviceProtocol.setProtocol("wsman")
Dell_Server_Storage_PD_DeviceProtocol.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_DeviceProtocol.setProtocolAttributeName("DeviceProtocol")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_DeviceProtocol)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("DeviceProtocol")
Dim Dell_Server_Storage_PD_DriverVersion
Set Dell_Server_Storage_PD_DriverVersion = New AttributeProperty
Dell_Server_Storage_PD_DriverVersion.setProtocol("wsman")
Dell_Server_Storage_PD_DriverVersion.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_DriverVersion.setProtocolAttributeName("DriverVersion")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_DriverVersion)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("DriverVersion")
Dim Dell_Server_Storage_PD_MediaType
Set Dell_Server_Storage_PD_MediaType = New AttributeProperty
Dell_Server_Storage_PD_MediaType.setProtocol("wsman")
Dell_Server_Storage_PD_MediaType.setClassName("cimv2/DCIM_PCIeSSDView")
'Dell_Server_Storage_PD_MediaType.setProtocolAttributeName("MediaType")
Dell_Server_Storage_PD_MediaType.setAttributeValueMappingObject()
Dell_Server_Storage_PD_MediaType.setAttributeValueMapping "0", "Magnetic Drive"
Dell_Server_Storage_PD_MediaType.setAttributeValueMapping "1", "Solid State Drive"
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_MediaType)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("MediaType")
Dim Dell_Server_Storage_PD_Manufacturer
Set Dell_Server_Storage_PD_Manufacturer = New AttributeProperty
Dell_Server_Storage_PD_Manufacturer.setProtocol("wsman")
Dell_Server_Storage_PD_Manufacturer.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_Manufacturer.setProtocolAttributeName("Manufacturer")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_Manufacturer)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("Manufacturer")
Dim Dell_Server_Storage_PD_ProductID
Set Dell_Server_Storage_PD_ProductID = New AttributeProperty
Dell_Server_Storage_PD_ProductID.setProtocol("wsman")
Dell_Server_Storage_PD_ProductID.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_ProductID.setProtocolAttributeName("ProductID")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_ProductID)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("ProductID")
Dim Dell_Server_Storage_PD_SerialNumber
Set Dell_Server_Storage_PD_SerialNumber = New AttributeProperty
Dell_Server_Storage_PD_SerialNumber.setProtocol("wsman")
Dell_Server_Storage_PD_SerialNumber.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_SerialNumber.setProtocolAttributeName("SerialNumber")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_SerialNumber)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("SerialNumber")
Dim Dell_Server_Storage_PD_DriveFormFactor
Set Dell_Server_Storage_PD_DriveFormFactor = New AttributeProperty
Dell_Server_Storage_PD_DriveFormFactor.setProtocol("wsman")
Dell_Server_Storage_PD_DriveFormFactor.setClassName("cimv2/DCIM_PCIeSSDView")
'Dell_Server_Storage_PD_DriveFormFactor.setProtocolAttributeName("DriveFormFactor")
Dell_Server_Storage_PD_DriveFormFactor.setAttributeValueMappingObject()
Dell_Server_Storage_PD_DriveFormFactor.setAttributeValueMapping "0", "Unknown"
Dell_Server_Storage_PD_DriveFormFactor.setAttributeValueMapping "1", "1.8 inch"
Dell_Server_Storage_PD_DriveFormFactor.setAttributeValueMapping "2", "2.5 inch"
Dell_Server_Storage_PD_DriveFormFactor.setAttributeValueMapping "3", "3.5 inch"
Dell_Server_Storage_PD_DriveFormFactor.setAttributeValueMapping "4", "2.5 inch Add-in card"
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_DriveFormFactor)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("DriveFormFactor")
Dim Dell_Server_Storage_PD_CapableSpeed
Set Dell_Server_Storage_PD_CapableSpeed = New AttributeProperty
Dell_Server_Storage_PD_CapableSpeed.setProtocol("wsman")
Dell_Server_Storage_PD_CapableSpeed.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_CapableSpeed.setProtocolAttributeName("MaxCapableSpeed")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_CapableSpeed)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("CapableSpeed")
Dim Dell_Server_Storage_PD_FirmwareVersion
Set Dell_Server_Storage_PD_FirmwareVersion = New AttributeProperty
Dell_Server_Storage_PD_FirmwareVersion.setProtocol("wsman")
Dell_Server_Storage_PD_FirmwareVersion.setClassName("cimv2/DCIM_PCIeSSDView")
Dell_Server_Storage_PD_FirmwareVersion.setProtocolAttributeName("Revision")
Dell_Server_Extender_PD_Obj.setAttributePropertyObject(Dell_Server_Storage_PD_FirmwareVersion)
Dell_Server_Extender_PD_Obj.setAttributeDictionary("FirmwareVersion")
Dell_Server_Extender_PD_Obj.populateProfileClassNameList()
profileInfoDict.Add "Dell.Server.Storage.Extender.PhysicalDisk",Dell_Server_Extender_PD_Obj
End If
End Function
Public Function destroyCOMObjects()
profileInfoDict.RemoveAll
set profileInfoDict = Nothing
End Function
End Class
'#################################################################################################################################
</ProfileDictionaryScript>
<ComponentInstanceFactoryScript>
'#################################################################################################################################
'**************************************************************************************************
'Component Instance Classes
'**************************************************************************************************
Class DellMonolithicServerInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim OMSAUrl
if compObject.getAttributevalue("HostName") = compObject.getAttributevalue("RemoteAccessIP") Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.MonolithicServer']$")
OMSAUrl = "Not Applicable"
Else
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.MonolithicServer.WithOS']$")
OMSAUrl = "https://" & compObject.getAttributevalue("HostName") & ":1311/"
End if
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Dim memSizeStr
Dim memSizeInt
If compObject.getAttributevalue("TotalMemory") <> "Not Available" Then
memSizeInt = CDbl(compObject.getAttributevalue("TotalMemory"))
If memSizeInt < 1024 Then
memSizeStr = compObject.getAttributevalue("TotalMemory") & " MB"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1048576 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
End If
Else
memSizeStr = "Not Available"
End If
Dim sysmemSizeStr
Dim sysmemSizeInt
If compObject.getAttributevalue("SysMemMaxCapacitySize") <> "Not Available" Then
sysmemSizeInt = CDbl(compObject.getAttributevalue("SysMemMaxCapacitySize"))
If sysmemSizeInt < 1024 Then
sysmemSizeStr = compObject.getAttributevalue("SysMemMaxCapacitySize") & " MB"
ElseIf sysmemSizeInt >= 1024 And sysmemSizeInt < 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1024
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " GB"
ElseIf sysmemSizeInt >= 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1048576
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " TB"
End If
Else
sysmemSizeStr = "Not Available"
End If
log.MOMDebugLog 1, "SysMemMaxCapacitySize" &compObject.getAttributevalue("SysMemMaxCapacitySize") & sysmemSizeStr
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.MonolithicServer", new DellMonolithicServerInstance
Class DellRackWorkStationInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim OMSAUrl
if Instr(Lcase(compObject.getAttributevalue("Model")), "precision rack") Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.RackWorkstation']$")
OMSAUrl = "Not Applicable"
Else
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.RackWorkstation.WithOs']$")
OMSAUrl = "https://" & compObject.getAttributevalue("HostName") & ":1311/"
End If
Dim memSizeStr
Dim memSizeInt
If compObject.getAttributevalue("TotalMemory") <> "Not Available" Then
memSizeInt = CDbl(compObject.getAttributevalue("TotalMemory"))
If memSizeInt < 1024 Then
memSizeStr = compObject.getAttributevalue("TotalMemory") & " MB"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1048576 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
End If
Else
memSizeStr = "Not Available"
End If
Dim sysmemSizeStr
Dim sysmemSizeInt
If compObject.getAttributevalue("SysMemMaxCapacitySize") <> "Not Available" Then
sysmemSizeInt = CDbl(compObject.getAttributevalue("SysMemMaxCapacitySize"))
If sysmemSizeInt < 1024 Then
sysmemSizeStr = compObject.getAttributevalue("SysMemMaxCapacitySize") & " MB"
ElseIf sysmemSizeInt >= 1024 And sysmemSizeInt < 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1024
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " GB"
ElseIf sysmemSizeInt >= 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1048576
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " TB"
End If
Else
sysmemSizeStr = "Not Available"
End If
log.MOMDebugLog 1, "SysMemMaxCapacitySize" &compObject.getAttributevalue("SysMemMaxCapacitySize") & sysmemSizeStr
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.RackWorkstation", new DellRackWorkStationInstance
Class DellModularBladeInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim OMSAUrl
if compObject.getAttributevalue("HostName") = compObject.getAttributevalue("RemoteAccessIP") Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.ModularBlade']$")
OMSAUrl = "Not Applicable"
Else
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.ModularBlade.WithOS']$")
OMSAUrl = "https://" & compObject.getAttributevalue("HostName") & ":1311/"
End if
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Dim memSizeStr
Dim memSizeInt
If compObject.getAttributevalue("TotalMemory") <> "Not Available" Then
memSizeInt = CDbl(compObject.getAttributevalue("TotalMemory"))
If memSizeInt < 1024 Then
memSizeStr = compObject.getAttributevalue("TotalMemory") & " MB"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1048576 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
End If
Else
memSizeStr = "Not Available"
End If
Dim sysmemSizeStr
Dim sysmemSizeInt
If compObject.getAttributevalue("SysMemMaxCapacitySize") <> "Not Available" Then
sysmemSizeInt = CDbl(compObject.getAttributevalue("SysMemMaxCapacitySize"))
If sysmemSizeInt < 1024 Then
sysmemSizeStr = compObject.getAttributevalue("SysMemMaxCapacitySize") & " MB"
ElseIf sysmemSizeInt >= 1024 And sysmemSizeInt < 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1024
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " GB"
ElseIf sysmemSizeInt >= 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1048576
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " TB"
End If
Else
sysmemSizeStr = "Not Available"
End If
log.MOMDebugLog 1, "SysMemMaxCapacitySize" &compObject.getAttributevalue("SysMemMaxCapacitySize") & sysmemSizeStr
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.ModularBlade", new DellModularBladeInstance
Class DellSledInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim OMSAUrl
if compObject.getAttributevalue("HostName") = compObject.getAttributevalue("RemoteAccessIP") Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Sled.WithoutOS']$")
OMSAUrl = "Not Applicable"
Else
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Sled.WithOS']$")
OMSAUrl = "https://" & compObject.getAttributevalue("HostName") & ":1311/"
End if
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Dim memSizeStr
Dim memSizeInt
If compObject.getAttributevalue("TotalMemory") <> "Not Available" Then
memSizeInt = CDbl(compObject.getAttributevalue("TotalMemory"))
If memSizeInt < 1024 Then
memSizeStr = compObject.getAttributevalue("TotalMemory") & " MB"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1048576 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
End If
Else
memSizeStr = "Not Available"
End If
Dim sysmemSizeStr
Dim sysmemSizeInt
If compObject.getAttributevalue("SysMemMaxCapacitySize") <> "Not Available" Then
sysmemSizeInt = CDbl(compObject.getAttributevalue("SysMemMaxCapacitySize"))
If sysmemSizeInt < 1024 Then
sysmemSizeStr = compObject.getAttributevalue("SysMemMaxCapacitySize") & " MB"
ElseIf sysmemSizeInt >= 1024 And sysmemSizeInt < 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1024
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " GB"
ElseIf sysmemSizeInt >= 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1048576
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " TB"
End If
Else
sysmemSizeStr = "Not Available"
End If
log.MOMDebugLog 1, "SysMemMaxCapacitySize" &compObject.getAttributevalue("SysMemMaxCapacitySize") & sysmemSizeStr
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Sled.WithoutOS", new DellSledInstance
Class DellSledNodeInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim OMSAUrl
if compObject.getAttributevalue("HostName") = compObject.getAttributevalue("RemoteAccessIP") Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.SledNode.WithoutOS']$")
OMSAUrl = "Not Applicable"
Else
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.SledNode.WithOS']$")
OMSAUrl = "https://" & compObject.getAttributevalue("HostName") & ":1311/"
End if
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Dim memSizeStr
Dim memSizeInt
If compObject.getAttributevalue("TotalMemory") <> "Not Available" Then
memSizeInt = CDbl(compObject.getAttributevalue("TotalMemory"))
If memSizeInt < 1024 Then
memSizeStr = compObject.getAttributevalue("TotalMemory") & " MB"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1048576 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
End If
Else
memSizeStr = "Not Available"
End If
Dim sysmemSizeStr
Dim sysmemSizeInt
If compObject.getAttributevalue("SysMemMaxCapacitySize") <> "Not Available" Then
sysmemSizeInt = CDbl(compObject.getAttributevalue("SysMemMaxCapacitySize"))
If sysmemSizeInt < 1024 Then
sysmemSizeStr = compObject.getAttributevalue("SysMemMaxCapacitySize") & " MB"
ElseIf sysmemSizeInt >= 1024 And sysmemSizeInt < 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1024
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " GB"
ElseIf sysmemSizeInt >= 1048576 Then
sysmemSizeInt = sysmemSizeInt / 1048576
sysmemSizeInt = round(sysmemSizeInt, 2)
sysmemSizeStr = Cstr(sysmemSizeInt) & " TB"
End If
Else
sysmemSizeStr = "Not Available"
End If
log.MOMDebugLog 1, "SysMemMaxCapacitySize" &compObject.getAttributevalue("SysMemMaxCapacitySize") & sysmemSizeStr
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.SledNode.WithoutOS", new DellSledNodeInstance
Class DellSMASHDeviceInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='Dell.Server.SMASHDevice']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='OOB!Microsoft.SystemCenter.OOB.WSManDevice']/IP$", keyPropertyDictionary.Item("Microsoft.SystemCenter.OOB.WSManDevice/IP"))
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.SMASHDevice", new DellSMASHDeviceInstance
Class DellUnManagedServerInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.UnManagedServer']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.UnManagedServer']/IPAddress$", keyPropertyDictionary.Item("Dell.Server.UnManagedServer/IPAddress"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.UnManagedServer", new DellUnManagedServerInstance
Class ServerAvgCUPSUtilPerDayInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.AvgCUPSUtilizationPerDay", new ServerAvgCUPSUtilPerDayInstance
Class ServerProcessorsInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Processors", new ServerProcessorsInstance
Class ProcUnitInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim procClockSpeedStr
Dim procClockSpeedInt
If compObject.getAttributevalue("MaxClockSpeed") <> "Not Available" Then
procClockSpeedInt = CDbl(compObject.getAttributevalue("MaxClockSpeed"))
If procClockSpeedInt < 1000 Then
procClockSpeedStr = compObject.getAttributevalue("MaxClockSpeed") & " MHz"
ElseIf procClockSpeedInt >= 1000 And procClockSpeedInt < 1000000 Then
procClockSpeedInt = procClockSpeedInt / 1000
procClockSpeedInt = round(procClockSpeedInt, 2)
procClockSpeedStr = Cstr(procClockSpeedInt) & " GHz"
ElseIf procClockSpeedInt >= 1000000 Then
procClockSpeedInt = procClockSpeedInt / 1000000
procClockSpeedInt = round(procClockSpeedInt, 2)
procClockSpeedStr = Cstr(procClockSpeedInt) & " THz"
End If
Else
procClockSpeedStr = "Not Available"
End If
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.ProcUnit", new ProcUnitInstance
Class MemoryInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Memory']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Memory", new MemoryInstance
Class MemoryUnitInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim memSizeStr
Dim memSizeInt
If compObject.getAttributevalue("Capacity") <> "Not Available" Then
memSizeInt = CDbl(compObject.getAttributevalue("Capacity"))
If memSizeInt < 1024 Then
memSizeStr = compObject.getAttributevalue("Capacity") & " MB"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1048576 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
End If
Else
memSizeStr = "Not Available"
End If
Dim memSpeedStr
Dim memSpeedInt
If compObject.getAttributevalue("Speed") <> "Not Available" Then
memSpeedInt = CDbl(compObject.getAttributevalue("Speed"))
If memSpeedInt < 1000 Then
memSpeedStr = compObject.getAttributevalue("Speed") & " MHz"
ElseIf memSpeedInt >= 1000 And memSpeedInt < 1000000 Then
memSpeedInt = memSpeedInt / 1000
memSpeedInt = round(memSpeedInt, 2)
memSpeedStr = Cstr(memSpeedInt) & " GHz"
ElseIf memSpeedInt >= 1000000 Then
memSpeedInt = memSpeedInt / 1000000
memSpeedInt = round(memSpeedInt, 2)
memSpeedStr = Cstr(memSpeedInt) & " THz"
End If
Else
memSpeedStr = "Not Available"
End If
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.MemoryUnit']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.MemoryUnit", new MemoryUnitInstance
Class LicenseGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.LicenseGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.LicenseGroup']/ID$", keyPropertyDictionary.Item("Dell.Server.LicenseGroup/ID"))
log.MOMDebugLog 1, "KeyProperty of LicenseGroup : " & keyPropertyDictionary.Item("Dell.Server.LicenseGroup/ID")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", displayName)
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.LicenseGroup", new LicenseGroupInstance
Class LicenseInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.License']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.License']/ID$", keyPropertyDictionary.Item("Dell.Server.License/ID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.LicenseGroup']/ID$", keyPropertyDictionary.Item("Dell.Server.LicenseGroup/ID"))
log.MOMDebugLog 1, "License Group KeyProperty: " & keyPropertyDictionary.Item("Dell.Server.LicenseGroup/ID")
log.MOMDebugLog 1, "License KeyProperty: " & keyPropertyDictionary.Item("Dell.Server.License/ID")
log.MOMDebugLog 1, "DisplayName : " & compObject.getAttributevalue("DisplayName")
log.MOMDebugLog 1, "LicenseType : " & compObject.getAttributevalue("LicenseType")
log.MOMDebugLog 1, "LicenseInstallDate : " & compObject.getAttributevalue("LicenseInstallDate")
log.MOMDebugLog 1, "LicenseSoldDate : " & compObject.getAttributevalue("LicenseSoldDate")
'call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.License']/DisplayName$",compObject.getAttributevalue("DisplayName"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.License']/LicenseType$",compObject.getAttributevalue("LicenseType"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.License']/LicenseInstallDate$",compObject.getAttributevalue("LicenseInstallDate"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.License']/LicenseSoldDate$",compObject.getAttributevalue("LicenseSoldDate"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", compObject.getAttributevalue("DisplayName"))
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.License", new LicenseInstance
Class SDCardGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
log.MOMDebugLog 1, "SDCardGroup KeyProperty: " & keyPropertyDictionary.Item("Dell.Server.SDCardGroup/ID")
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.SDCardGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.SDCardGroup']/ID$", keyPropertyDictionary.Item("Dell.Server.SDCardGroup/ID"))
log.MOMDebugLog 1, "SDCardGroup KeyProperty: " & keyPropertyDictionary.Item("Dell.Server.SDCardGroup/ID")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", displayName)
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.SDCardGroup", new SDCardGroupInstance
Class SDCardInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject)
If Not compObject is Nothing Then
Dim sdCardSizeStr
Dim sdCardSizeInt
log.MOMDebugLog 1, "Printing The SDCard Size: " & compObject.getAttributevalue("Size")
If compObject.getAttributevalue("Size") <> "Not Applicable" Then
sdCardSizeInt = CDbl(compObject.getAttributevalue("Size"))
If sdCardSizeInt < 1024 Then
sdCardSizeStr = compObject.getAttributevalue("Size") & " MB"
ElseIf sdCardSizeInt >= 1024 And sdCardSizeInt < 1048576 Then
sdCardSizeInt = sdCardSizeInt / 1024
sdCardSizeInt = round(sdCardSizeInt, 2)
sdCardSizeStr = Cstr(sdCardSizeInt) & " GB"
ElseIf sdCardSizeInt >= 1048576 Then
sdCardSizeInt = sdCardSizeInt / 1048576
sdCardSizeInt = round(sdCardSizeInt, 2)
sdCardSizeStr = Cstr(sdCardSizeInt) & " TB"
End If
Else
sdCardSizeStr = "Not Available"
End If
Dim sdCardWriteProtectedStr
log.MOMDebugLog 1, "Printing The SDCard WriteProtected: " & compObject.getAttributevalue("WriteProtected")
If Not compObject.getAttributevalue("WriteProtected") <> "Not Applicable" Then
sdCardWriteProtectedStr = "Not Available"
Else
sdCardWriteProtectedStr = compObject.getAttributevalue("WriteProtected")
End If
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.SDCard']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.SDCardGroup']/ID$", keyPropertyDictionary.Item("Dell.Server.SDCardGroup/ID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.SDCard']/ID$", keyPropertyDictionary.Item("Dell.Server.SDCard/ID"))
'call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.SDCard']/DisplayName$",compObject.getAttributevalue("DisplayName"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.SDCard']/Size$", sdCardSizeStr)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.SDCard']/WriteProtected$", sdCardWriteProtectedStr)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", compObject.getAttributevalue("DisplayName"))
log.MOMDebugLog 1, "SDCard KeyProperty: " & keyPropertyDictionary.Item("Dell.Server.SDCard/ID")
log.MOMDebugLog 1, "SdCard DisplayName: " & compObject.getAttributevalue("DisplayName")
log.MOMDebugLog 1, "SdCard Size: " & sdCardSizeStr
log.MOMDebugLog 1, "SdCard WriteProtected: " & sdCardWriteProtectedStr
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.SDCard", new SDCardInstance
Class HostNICGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.HostNICGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
log.MOMDebugLog 1, "KeyProperty of HostNICGroup : " & keyPropertyDictionary.Item("Dell.Server.HostNICGroup/ID")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", displayName)
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.HostNICGroup", new HostNICGroupInstance
Class HostNICInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.HostNIC", new HostNICInstance
Class PowerSuppliesInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.PowerSupplies']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.PowerSupplies", new PowerSuppliesInstance
Class PSUnitInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.PSUnit']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.PSUnit", new PSUnitInstance
Class BIOSInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.BIOS']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/Name$",compObject.getAttributevalue("Name"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/Manufacturer$",compObject.getAttributevalue("Manufacturer"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/SMBIOSBIOSVersion$",compObject.getAttributevalue("SMBIOSBIOSVersion"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/SMBIOSMajorVersion$",compObject.getAttributevalue("SMBIOSMajorVersion"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/SMBIOSMinorVersion$",compObject.getAttributevalue("SMBIOSMinorVersion"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/SMBIOSPresent$",compObject.getAttributevalue("SMBIOSPresent"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/PrimaryBIOS$","Not Available") ' iDRAC does not support these values
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/CurrentLanguage$","Not Available") ' iDRAC does not support these values
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.BIOS']/BIOSReleaseDate$",compObject.getAttributevalue("BIOSReleaseDate"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", displayName)
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.BIOS", new BIOSInstance
Class iDRACInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.iDRAC']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.iDRAC", new iDRACInstance
Class iDRACNicInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.iDrac.NetworkInterfaceUnit']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.iDrac.NetworkInterfaceUnit", new iDRACNicInstance
Class NICGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.NICGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.NICGroup", new NICGroupInstance
Class NetworkInterfaceUnitInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef nicCapabilitiesObject, ByRef displayName)
Dim supportedBootProtocol, nICCapabilities
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.NetworkInterfaceUnit']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server']/UID$", keyPropertyDictionary.Item("Dell.Server/UID"))
Dim mediaTypeattr, mediaTypevalarr, mediaTypeval, mediaType, vMacAdd, pMacAdd, cMacAdd
Dim tempval
mediaTypeattr = compObject.getAttributevalue("MediaType")
log.MOMDebugLog 1, "media type map : " & mediaTypeattr
mediaTypevalarr = Split(mediaTypeattr,",")
For Each mediaTypeval In mediaTypevalarr
Select Case mediaTypeval
Case "0"
tempval = "Unknown"
Case "1"
tempval = "Base-T"
Case "2"
tempval = "KR"
Case "3"
tempval = "KX"
Case "4"
tempval = "KX4"
Case "5"
tempval = "SR"
Case "6"
tempval = "SFP"
Case "7"
tempval = "SFP+"
Case "8"
tempval = "DCA"
Case else
tempval = mediaTypeval
log.MOMDebugLog 1, "media type map is not found, hence going with value resulted:" & tempval
End Select
mediaType = mediaType & "," & tempval
next
mediaType = Replace(mediaType,",","",1,1)
log.MOMDebugLog 1, "media type value is" & mediaType
If not nicCapabilitiesObject is Nothing Then
If nicCapabilitiesObject.getAttributevalue("FCoEBootSupport") = "2" Then
supportedBootProtocol = "FCoE"
End If
If nicCapabilitiesObject.getAttributevalue("PXEBootSupport") = "2" Then
If supportedBootProtocol = "" Then
supportedBootProtocol = "PXE"
Else
supportedBootProtocol = supportedBootProtocol & "," & "PXE"
End If
End If
If nicCapabilitiesObject.getAttributevalue("iSCSIBootSupport") = "2" Then
If supportedBootProtocol = "" Then
supportedBootProtocol = "iSCSI"
Else
supportedBootProtocol = supportedBootProtocol & "," & "iSCSI"
End If
End If
If supportedBootProtocol = "" Then
supportedBootProtocol = "Not Available"
End If
log.MOMDebugLog 1, "supportBootprotocol value is" & supportedBootProtocol
If nicCapabilitiesObject.getAttributevalue("WOLSupport") = "2" Then
nICCapabilities = "WOL"
End If
If nicCapabilitiesObject.getAttributevalue("FlexAddressingSupport") = "2" Then
If nICCapabilities = "" Then
nICCapabilities = "FlexAddressing"
Else
nICCapabilities = nICCapabilities & "," & "FlexAddressing"
End If
End If
If nicCapabilitiesObject.getAttributevalue("VFSRIOVSupport") = "2" Then
If nICCapabilities = "" Then
nICCapabilities = "SR-IOV"
Else
nICCapabilities = nICCapabilities & "," & "SR-IOV"
End If
End If
If nicCapabilitiesObject.getAttributevalue("iSCSIOffloadSupport") = "2" Then
If nICCapabilities = "" Then
nICCapabilities = "iSCSI Offload"
Else
nICCapabilities = nICCapabilities & "," & " iSCSI Offload"
End If
End If
If nicCapabilitiesObject.getAttributevalue("FCoEOffloadSupport") = "2" Then
If nICCapabilities = "" Then
nICCapabilities = "FCoE Offload"
Else
nICCapabilities = nICCapabilities & "," & "FCoE Offload"
End If
End If
If nicCapabilitiesObject.getAttributevalue("NicPartitioningSupport") = "2" Then
If nICCapabilities = "" Then
nICCapabilities = "Partitioning"
Else
nICCapabilities = nICCapabilities & "," & "Partitioning"
End If
End If
If nicCapabilitiesObject.getAttributevalue("TCPChimneySupport") = "2" Then
If nICCapabilities = "" Then
nICCapabilities = "TOE"
Else
nICCapabilities = nICCapabilities & "," & "TOE"
End If
End If
If nicCapabilitiesObject.getAttributevalue("DCBExchangeProtocol") = "2" Then
If nICCapabilities = "" Then
nICCapabilities = "DCB"
Else
nICCapabilities = nICCapabilities & "," & "DCB"
End If
End If
If nICCapabilities = "" Then
nICCapabilities = "Not Available"
End If
log.MOMDebugLog 1, "nICCapabilities value is" & nICCapabilities
Else
nICCapabilities = "Not Available"
supportedBootProtocol = "Not Available"
End If
vMacAdd = compObject.getAttributevalue("VirtualMACAddress")
pMacAdd = compObject.getAttributevalue("PermanentMACAddress")
cMacAdd = compObject.getAttributevalue("CurrentMACAddress")
If vMacAdd = "00:00:00:00:00:00" OR vMacAdd = "FF:FF:FF:FF:FF:FF" OR pMacAdd = cMacAdd Then
vMacAdd = "Not Configured"
Else
If vMacAdd = "" Then
vMacAdd = "Not Available"
End If
End If
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.NetworkInterfaceUnit", new NetworkInterfaceUnitInstance
Class StorageInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage", new StorageInstance
Class ControllerInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/SlotID$",compObject.getAttributevalue("SlotID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/FirmwareVer$",compObject.getAttributevalue("FirmwareVer"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/DriverVer$",compObject.getAttributevalue("DriverVer"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/MinReqDriverVer$",compObject.getAttributevalue("MinReqDriverVer"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/SCSIInitiatorID$",compObject.getAttributevalue("SCSIInitiatorID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/PCIVendorID$",compObject.getAttributevalue("PCIVendorID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/DeviceCardManufacturer$",compObject.getAttributevalue("DeviceCardManufacturer"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/DeviceCardSlotType$",compObject.getAttributevalue("DeviceCardSlotType"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/ProductName$",compObject.getAttributevalue("ProductName"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/SASAddress$",compObject.getAttributevalue("SASAddress"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/Security$",compObject.getAttributevalue("Security"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/EncryptionMode$",compObject.getAttributevalue("EncryptionMode"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/EncryptionCapability$",compObject.getAttributevalue("EncryptionCapability"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/CachecadeCapability$",compObject.getAttributevalue("CachecadeCapability"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/SlicedVDCapability$",compObject.getAttributevalue("SlicedVDCapability"))
'Unit conversion for Cache Size In MB
Dim CacheSizeStr
Dim CacheSizeInt
If compObject.getAttributevalue("CacheSizeInMB") <> "Not Available" Then
CacheSizeInt = CDbl(compObject.getAttributevalue("CacheSizeInMB"))
If CacheSizeInt < 1024 Then
CacheSizeStr = compObject.getAttributevalue("CacheSizeInMB") & " MB"
ElseIf CacheSizeInt >= 1024 And CacheSizeInt < 1048576 Then
CacheSizeInt = CacheSizeInt / 1024
CacheSizeInt = round(CacheSizeInt, 2)
CacheSizeStr = Cstr(CacheSizeInt) & " GB"
ElseIf CacheSizeInt >= 1048576 Then
CacheSizeInt = CacheSizeInt / 1048576
CacheSizeInt = round(CacheSizeInt, 2)
CacheSizeStr = Cstr(CacheSizeInt) & " TB"
End If
Else
CacheSizeStr = "Not Available"
End If
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/CacheMemorySize$",CacheSizeStr)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller']/MinReqFirmwareVer$",compObject.getAttributevalue("MinReqFirmwareVer"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", displayName)
omAPIHelper.AddInstanceToDiscoveryData oInst
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller", new ControllerInstance
Class ControllerSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Sensor']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Sensor", new ControllerSensorInstance
Class ControllerBatteryGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.BatteryGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.BatteryGroup", new ControllerBatteryGroupInstance
Class ControllerBatteryUnitInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Battery']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Battery", new ControllerBatteryUnitInstance
Class ConnectorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Connector']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Connector", new ConnectorInstance
Class VirtualDiskGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.VirtualDiskGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.VirtualDiskGroup", new VirtualDiskGroupInstance
Class VirtualDiskInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim memSizeStr
Dim memSizeInt
If compObject.getAttributevalue("Size") <> "Not Available" Then
memSizeInt = CDbl(compObject.getAttributevalue("Size"))
If memSizeInt < 1024 Then
memSizeStr = compObject.getAttributevalue("Size") & " Bytes"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " KB"
ElseIf memSizeInt >= 1048576 And memSizeInt < 1073741824 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " MB"
ElseIf memSizeInt >= 1073741824 And memSizeInt < 1099511627776 Then
memSizeInt = memSizeInt / 1073741824
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1099511627776 And memSizeInt < 1125899906842624 Then
memSizeInt = memSizeInt / 1099511627776
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
ElseIf memSizeInt >= 1125899906842624 Then
memSizeInt = memSizeInt / 1125899906842624
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " PB"
End If
Else
memSizeStr = "Not Available"
End If
Dim memBlockSizeStr
Dim memBlockSizeInt
If compObject.getAttributevalue("BlockSize") <> "Not Available" Then
memBlockSizeInt = CDbl(compObject.getAttributevalue("BlockSize"))
If memBlockSizeInt < 1024 Then
memBlockSizeStr = compObject.getAttributevalue("BlockSize") & " Bytes"
ElseIf memBlockSizeInt >= 1024 And memBlockSizeInt < 1048576 Then
memBlockSizeInt = memBlockSizeInt / 1024
memBlockSizeInt = round(memBlockSizeInt, 2)
memBlockSizeStr = Cstr(memBlockSizeInt) & " KB"
ElseIf memBlockSizeInt >= 1048576 And memBlockSizeInt < 1073741824 Then
memBlockSizeInt = memBlockSizeInt / 1048576
memBlockSizeInt = round(memBlockSizeInt, 2)
memBlockSizeStr = Cstr(memBlockSizeInt) & " MB"
ElseIf memBlockSizeInt >= 1073741824 And memBlockSizeInt < 1099511627776 Then
memBlockSizeInt = memBlockSizeInt / 1073741824
memBlockSizeInt = round(memBlockSizeInt, 2)
memBlockSizeStr = Cstr(memBlockSizeInt) & " GB"
ElseIf memBlockSizeInt >= 1099511627776 And memBlockSizeInt < 1125899906842624 Then
memBlockSizeInt = memBlockSizeInt / 1099511627776
memBlockSizeInt = round(memBlockSizeInt, 2)
memBlockSizeStr = Cstr(memBlockSizeInt) & " TB"
ElseIf memBlockSizeInt >= 1125899906842624 Then
memBlockSizeInt = memBlockSizeInt / 1125899906842624
memBlockSizeInt = round(memBlockSizeInt, 2)
memBlockSizeStr = Cstr(memBlockSizeInt) & " PB"
End If
Else
memBlockSizeStr = "Not Available"
End If
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.VirtualDisk']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.VirtualDisk", new VirtualDiskInstance
Class InternalPhysicalDiskInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function convertSize(ByRef memSizeInt)
Dim memSizeStr
If memSizeInt < 1024 Then
memSizeStr = Cstr(memSizeInt) & " Bytes"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " KB"
ElseIf memSizeInt >= 1048576 And memSizeInt < 1073741824 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " MB"
ElseIf memSizeInt >= 1073741824 And memSizeInt < 1099511627776 Then
memSizeInt = memSizeInt / 1073741824
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1099511627776 And memSizeInt < 1125899906842624 Then
memSizeInt = memSizeInt / 1099511627776
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
ElseIf memSizeInt >= 1125899906842624 Then
memSizeInt = memSizeInt / 1125899906842624
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " PB"
End If
convertSize = memSizeStr
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim sizeStr
Dim sizeInt,negotiatedSpeedValue
'Possible values for Negotiated speed are 1_5_GBS, 3_GBS, 6_GBS.
'Following lines are to map 1_5_GBS to 1.5 Gbps , 3_GBS to 3 Gbps and 6_GBS to 6 gbps
negotiatedSpeedValue = compObject.getAttributevalue("NegotiatedSpeed")
If negotiatedSpeedValue <> "Not Available" Then
negotiatedSpeedValue = Trim(negotiatedSpeedValue)
'Following replace will convert 1_3_GBS to 1_3 Gbps OR 3_GBS to 3 Gbps
negotiatedSpeedValue = Replace(UCase(negotiatedSpeedValue), "_GBS"," Gbps")
'Following replace will convert 1_3 Gbps to 1.3 Gbps
negotiatedSpeedValue = Replace(negotiatedSpeedValue,"_",".")
Else
negotiatedSpeedValue = "Not Available"
End If
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.InternalPhysicalDisk']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.InternalPhysicalDisk", new InternalPhysicalDiskInstance
Class InternalPhysicalDiskGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.InternalPhysicalDiskGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.InternalPhysicalDiskGroup", new InternalPhysicalDiskGroupInstance
Class ExternalPhysicalDiskInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function convertSize(ByRef memSizeInt)
Dim memSizeStr
If memSizeInt < 1024 Then
memSizeStr = Cstr(memSizeInt) & " Bytes"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " KB"
ElseIf memSizeInt >= 1048576 And memSizeInt < 1073741824 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " MB"
ElseIf memSizeInt >= 1073741824 And memSizeInt < 1099511627776 Then
memSizeInt = memSizeInt / 1073741824
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1099511627776 And memSizeInt < 1125899906842624 Then
memSizeInt = memSizeInt / 1099511627776
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
ElseIf memSizeInt >= 1125899906842624 Then
memSizeInt = memSizeInt / 1125899906842624
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " PB"
End If
convertSize = memSizeStr
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim sizeStr
Dim sizeInt,negotiatedSpeedValue
'Possible values for Negotiated speed are 1_5_GBS, 3_GBS, 6_GBS.
'Following lines are to map 1_5_GBS to 1.5 Gbps , 3_GBS to 3 Gbps and 6_GBS to 6 gbps
negotiatedSpeedValue = compObject.getAttributevalue("NegotiatedSpeed")
If negotiatedSpeedValue <> "Not Available" Then
negotiatedSpeedValue = Trim(negotiatedSpeedValue)
'Following replace will convert 1_3_GBS to 1_3 Gbps OR 3_GBS to 3 Gbps
negotiatedSpeedValue = Replace(UCase(negotiatedSpeedValue), "_GBS"," Gbps")
'Following replace will convert 1_3 Gbps to 1.3 Gbps
negotiatedSpeedValue = Replace(negotiatedSpeedValue,"_",".")
Else
negotiatedSpeedValue = "Not Available"
End If
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.ExternalPhysicalDisk']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.ExternalPhysicalDisk", new ExternalPhysicalDiskInstance
Class ExternalPhysicalDiskGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.ExternalPhysicalDiskGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.ExternalPhysicalDiskGroup", new ExternalPhysicalDiskGroupInstance
Class DirectAttachedPhysicalDiskInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function convertSize(ByRef memSizeInt)
Dim memSizeStr
If memSizeInt < 1024 Then
memSizeStr = Cstr(memSizeInt) & " Bytes"
ElseIf memSizeInt >= 1024 And memSizeInt < 1048576 Then
memSizeInt = memSizeInt / 1024
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " KB"
ElseIf memSizeInt >= 1048576 And memSizeInt < 1073741824 Then
memSizeInt = memSizeInt / 1048576
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " MB"
ElseIf memSizeInt >= 1073741824 And memSizeInt < 1099511627776 Then
memSizeInt = memSizeInt / 1073741824
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " GB"
ElseIf memSizeInt >= 1099511627776 And memSizeInt < 1125899906842624 Then
memSizeInt = memSizeInt / 1099511627776
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " TB"
ElseIf memSizeInt >= 1125899906842624 Then
memSizeInt = memSizeInt / 1125899906842624
memSizeInt = round(memSizeInt, 2)
memSizeStr = Cstr(memSizeInt) & " PB"
End If
convertSize = memSizeStr
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Dim sizeInt
Dim sizeStr, negotiatedSpeedValue
'Possible values for Negotiated speed are 1_5_GBS, 3_GBS, 6_GBS.
'Following lines are to map 1_5_GBS to 1.5 Gbps , 3_GBS to 3 Gbps and 6_GBS to 6 gbps
negotiatedSpeedValue = compObject.getAttributevalue("NegotiatedSpeed")
If negotiatedSpeedValue <> "Not Available" Then
negotiatedSpeedValue = Trim(negotiatedSpeedValue)
'Following replace will convert 1_3_GBS to 1_3 Gbps OR 3_GBS to 3 Gbps
negotiatedSpeedValue = Replace(UCase(negotiatedSpeedValue), "_GBS"," Gbps")
'Following replace will convert 1_3 Gbps to 1.3 Gbps
negotiatedSpeedValue = Replace(negotiatedSpeedValue,"_",".")
Else
negotiatedSpeedValue = "Not Available"
End If
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.DirectAttachedPhysicalDisk']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.DirectAttachedPhysicalDisk", new DirectAttachedPhysicalDiskInstance
Class EnclosureInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure", new EnclosureInstance
Class EMMInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.EMM']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.EMM", new EMMInstance
Class EnclosureFanSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.FanSensor']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.FanSensor", new EnclosureFanSensorInstance
Class EnclosureFanSensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.FanSensorGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.FanSensorGroup", new EnclosureFanSensorGroupInstance
Class EnclosurePowerSupplyInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.PowerSupply']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.PowerSupply", new EnclosurePowerSupplyInstance
Class EnclosurePowerSupplyGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.PowerSupplyGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.PowerSupplyGroup", new EnclosurePowerSupplyGroupInstance
Class EnclosureTempSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.TempSensor']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.TempSensor", new EnclosureTempSensorInstance
Class EnclosureTempSensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.TempSensorGroup']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.TempSensorGroup", new EnclosureTempSensorGroupInstance
Class EnclosureSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Controller.Enclosure.Sensor']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Controller.Enclosure.Sensor", new EnclosureSensorInstance
Class Sensors
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Sensors", new Sensors
Class TemperatureSensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.TemperatureSensorGroup", new TemperatureSensorGroupInstance
Class TemperatureSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.TemperatureSensor", new TemperatureSensorInstance
Class FanSensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.FanSensorGroup", new FanSensorGroupInstance
Class FanSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.FanSensor", new FanSensorInstance
Class VoltageSensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.VoltageSensorGroup", new VoltageSensorGroupInstance
Class VoltageSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.VoltageSensor", new VoltageSensorInstance
Class IntrusionSensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.IntrusionSensorGroup", new IntrusionSensorGroupInstance
Class IntrusionSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.IntrusionSensor", new IntrusionSensorInstance
Class BatterySensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.BatterySensorGroup", new BatterySensorGroupInstance
Class BatterySensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.BatterySensor", new BatterySensorInstance
Class CurrentSensorGroupInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.CurrentSensorGroup", new CurrentSensorGroupInstance
Class CurrentSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.CurrentSensor", new CurrentSensorInstance
Class PresenceAndStatusSensorInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.PresenceAndStatusSensor", new PresenceAndStatusSensorInstance
'T Update PCIeSSD instances
Class ExtenderInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
log.MOMDebugLog 1, "KeyProperty of Dell.Server.Storage.Extender : " & keyPropertyDictionary.Item("Dell.Server.Storage.Extender/ID")
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Extender']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Extender", new ExtenderInstance
Class BackPlaneInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Extender.BackPlane", new BackPlaneInstance
Class PCIeSSDPhysicalDiskInstance
Private keyPropertyDictionary
Private oInst
Private Sub Class_Initialize
Set keyPropertyDictionary = CreateObject("Scripting.Dictionary")
keyPropertyDictionary.CompareMode = vbTextCompare
End Sub
Public Function ClearKeyProperties()
keyPropertyDictionary.RemoveAll 'Clear the dictionary
End Function
Public Function SetKeyProperty(ByRef key, ByRef val)
keyPropertyDictionary.Add key, val
End Function
Public Function CreateAndPopulateInstance(ByRef omAPIHelper, ByRef compObject, ByRef displayName)
If Not compObject is Nothing Then
Set oInst=omAPIHelper.CreateClassInstance("$MPElement[Name='DellModelServer!Dell.Server.Storage.Extender.PhysicalDisk']$")
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", principalName)
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage/ID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Extender']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage.Extender/ID"))
call omAPIHelper.oInstAddProperty(oInst, "$MPElement[Name='DellModelServer!Dell.Server.Storage.Extender.BackPlane']/ID$", keyPropertyDictionary.Item("Dell.Server.Storage.Extender.BackPlane/ID"))
Set CreateAndPopulateInstance = oInst
End If
End Function
End Class
creatorFactory.Add "Dell.Server.Storage.Extender.PhysicalDisk", new PCIeSSDPhysicalDiskInstance
'#################################################################################################################################
</ComponentInstanceFactoryScript>
<PrePopulationScript>
'#################################################################################################################################
'**************************************************************************************************
'Discovery PrePopulator code
'**************************************************************************************************
Class PrePopulatorMapper
Function PrePopulateFields(ByRef compObject, ByRef protParameterObj)
Dim className
className = compObject.getMgmtConsoleClassName()
If className = "Dell.Server" Then
Dim serverHostName
serverHostName = compObject.getAttributevalue("HostName")
If serverHostName = "Not Available" Then
Call compObject.modifyExistingAttributeValue("HostName", protParameterObj.getProtocolParameterValue("IPAddress"))
End If
Dim chaSrvTag
chaSrvTag = compObject.getAttributevalue("ChassisServiceTag")
If ( IsNull(chaSrvTag) OR chaSrvTag = "") Then
chaSrvTag = "Not Available"
Call compObject.modifyExistingAttributeValue("ChassisServiceTag", chaSrvTag)
End If
Call compObject.modifyExistingAttributeValue("RemoteAccessIP", protParameterObj.getProtocolParameterValue("IPAddress"))
Call compObject.modifyExistingAttributeValue("RemoteSettings", getRemoteSetting())
End If
End Function
End Class
'#################################################################################################################################
</PrePopulationScript>
<ServerDiscoveryScript>
'#################################################################################################################################
'**************************************************************************************************
'Discovery PreChecker code
'**************************************************************************************************
Dim discoveryHelperObject, serverGeneration, isServerManaged, serverType, generationValue, isHostNICManaged, modelType
Dim isPCIeSSDExtenderManaged, isPCIeSSDBackPlaneManaged, isPCIeSSDPhysicalDiskManaged
Dim doDiscovery, iDRACNicEnabled, discoveryPreCheckerObj, discoveryPreCheckerObj1, discoveryPreCheckerObj2, discoveryPreCheckerObj3, discoveryPreCheckerObj4
Set discoveryPreCheckerObj = New DiscoveryPreChecker
call discoveryPreCheckerObj.setProtocol("wsman")
call discoveryPreCheckerObj.setProtocolParameterObject(protParameterObj)
call discoveryPreCheckerObj.setProfileClasses("cimv2/DCIM_SystemView")
call discoveryPreCheckerObj.setComponentInventoryProfileHandle(discoveryPreCheckerObj.fetchSystemInfoFromDevice())
call discoveryPreCheckerObj.doServerClassification()
serverGeneration = discoveryPreCheckerObj.getServerGeneration()
isServerManaged = discoveryPreCheckerObj.isServerManaged()
serverType = discoveryPreCheckerObj.getServerType()
generationValue = discoveryPreCheckerObj.getGeneration()
'modelType = discoveryPreCheckerObj.getModel()
log.MOMDebugLog 1, "ServerManaged value is: " & isServerManaged
log.MOMDebugLog 1, "Server Type value is: " & serverType
Set discoveryPreCheckerObj1 = New DiscoveryPreChecker
call discoveryPreCheckerObj1.setProtocol("wsman")
call discoveryPreCheckerObj1.setProtocolParameterObject(protParameterObj)
call discoveryPreCheckerObj1.setProfileClasses("cimv2/DCIM_HOSTNetworkInterfaceView")
call discoveryPreCheckerObj1.setComponentInventoryProfileHandle(discoveryPreCheckerObj1.fetchSystemInfoFromDevice())
isHostNICManaged = discoveryPreCheckerObj1.IsHostNicPresent()
log.MOMDebugLog 1, "isHostNICManaged value is: " & isHostNICManaged
Set discoveryPreCheckerObj2 = New DiscoveryPreChecker
call discoveryPreCheckerObj2.setProtocol("wsman")
call discoveryPreCheckerObj2.setProtocolParameterObject(protParameterObj)
call discoveryPreCheckerObj2.setProfileClasses("cimv2/DCIM_PCIeSSDExtenderView")
call discoveryPreCheckerObj2.setComponentInventoryProfileHandle(discoveryPreCheckerObj2.fetchSystemInfoFromDevice())
Set discoveryPreCheckerObj4 = New DiscoveryPreChecker
call discoveryPreCheckerObj4.setProtocol("wsman")
call discoveryPreCheckerObj4.setProtocolParameterObject(protParameterObj)
call discoveryPreCheckerObj4.setProfileClasses("cimv2/DCIM_PCIeSSDView")
call discoveryPreCheckerObj4.setComponentInventoryProfileHandle(discoveryPreCheckerObj4.fetchSystemInfoFromDevice())
isPCIeSSDPhysicalDiskManaged = discoveryPreCheckerObj4.isPCIeSSDPhysicalDiskPresent()
log.MOMDebugLog 1, "PCIeSSDPhysicalDisk presence: " & isPCIeSSDPhysicalDiskManaged
If isServerManaged = "" And serverGeneration = "" Then
Set discoveryHelperObject = New DiscoveryHelper
Call discoveryHelperObject.CreateAndSubmitEmptyDiscoveryData()
discoveryHelperObject.destroyCOMObjects()
Set discoveryHelperObject = Nothing
End If
log.MOMDebugLog 1, "generation value is: " & generationValue
' TODO: change the serverGeneration checking code to check for 12G onwards
If isServerManaged = "True" And generationValue > 11 Then
' Check if the Set Preferred Monitoring method is set for 12G devices onwards.
' Based on that the doDiscovery flag is set
' doDiscovery flag is also set after checking if the device has license allotted
doDiscovery = discoveryPreCheckerObj.isDoDiscoveryFlagSet()
'doDiscovery = True ***Hardcoding doDiscovery if Service tag is unknown or unavailable
log.MOMDebugLog 1, "doDiscovery value is: " & doDiscovery
iDRACNicEnabled = discoveryPreCheckerObj.isiDRACNicEnableFlagSet()
log.MOMDebugLog 1, "isiDRACNicEnableFlag value is: " & iDRACNicEnabled
discoveryPreCheckerObj.destroyCOMObjects()
Set discoveryPreCheckerObj = Nothing
If doDiscovery = True Then
' Proceeding with the discovery of 12G+ devices...
Dim profileDictCreatorObj
Set profileDictCreatorObj = New ProfileDictionaryCreator
'update isHostNIC member value.
profileDictCreatorObj.ishostNIC = isHostNICManaged
profileDictCreatorObj.isPCIeSSDExtender = isPCIeSSDExtenderManaged
profileDictCreatorObj.isPCIeSSDBackPlane = isPCIeSSDBackPlaneManaged
profileDictCreatorObj.isPCIeSSDPhysicalDisk = isPCIeSSDPhysicalDiskManaged
profileDictCreatorObj.generation = generationValue
Dim profileInfoDict
Set profileInfoDict = profileDictCreatorObj.GetProfileDictionary()
log.MOMDebugLog 1, "GetProfileDictionary Done: "
Dim profDictReader
Set profDictReader = New ProfileDictionaryReader
profDictReader.setListofProtocolAndClassNames(profileInfoDict)
Dim protoList
protoList = profDictReader.getProtocolList()
Dim protFactoryObj
Set protFactoryObj = New ProtocolFactory
Dim classList
classList = profDictReader.getClassNameList()
Dim protocolHelperOject
Dim i, componentInventoryProfileHandle
set componentInventoryProfileHandle=CreateObject("Scripting.Dictionary")
componentInventoryProfileHandle.CompareMode = vbTextCompare
For i=0 to profDictReader.getProtocolListCount() -1
Set protocolHelperOject = protFactoryObj.getProtocolHelperObject(protoList(i), protParameterObj)
protocolHelperOject.ProfileNameArrayObj=classList
Set componentInventoryProfileHandle = protocolHelperOject.GetProfileDictionary()
Next
'Now use the Protocol Helper object to pass the list of DCIM classes
Dim invDataParser, compObjectList
Set invDataParser = New InventoryDataParser
invDataParser.setComponentInventoryProfileHandle(componentInventoryProfileHandle)
invDataParser.populateComponentObjects(profileInfoDict)
compObjectList = invDataParser.getComponentObjects()
'**************************************************************************************************
'Discoverydata invocation for Managed Server
'**************************************************************************************************
Set discoveryHelperObject = New DiscoveryHelper
'Create class instance and properties and submit the scom discovery data
Call discoveryHelperObject.CreateClassInstanceAndProperties(compObjectList, serverType)
Dim stoContList, stoEnclList, stoEnclEMMList, stoEnclPSList, stoVirtDiskList, stoPhyDiskList, stoEnclFanSensorList, stoEnclTempSensorList, stoContBatteryList, compObjListFilter, stoCompModellerObj, stoExtenderList, stoBackPlaneList, stoPDList
Set compObjListFilter = New ComponentObjectListFilter
stoContList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoEnclList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.Enclosure")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoEnclEMMList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.Enclosure.EMM")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoEnclPSList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.Enclosure.PowerSupply")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoVirtDiskList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.VirtualDisk")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoPhyDiskList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.PhysicalDisk")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoEnclFanSensorList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.Enclosure.FanSensor")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoEnclTempSensorList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.Enclosure.TempSensor")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoContBatteryList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.Battery")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
'T Storage.Extender
log.MOMDebugLog 1, "Dell.Server.Storage.Extender "
Set compObjListFilter = New ComponentObjectListFilter
stoExtenderList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Extender")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
log.MOMDebugLog 1, "Dell.Server.Storage.Extender.Backplane "
Set compObjListFilter = New ComponentObjectListFilter
stoBackPlaneList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Extender.BackPlane")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
Set compObjListFilter = New ComponentObjectListFilter
stoPDList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Extender.PhysicalDisk")
compObjListFilter.destroyCOMObjects()
set compObjListFilter = Nothing
log.MOMDebugLog 1, "Dell.Server.Storage.Extender Server ID: " & discoveryHelperObject.GetServerUID()
Dim omAPIHelper: Set omAPIHelper = discoveryHelperObject.GetMomAPIHelper()
Dim oStoInst, oServInst, oServStoRelationship, hostMgmtServer, ServiceTag, SledName, oHealthServiceInstance, instance, healthServiceRelationship, serverUID
Set stoCompModellerObj = New StorageComponentModeller
call stoCompModellerObj.setMomApiHelper(omAPIHelper)
call stoCompModellerObj.setServerUID(discoveryHelperObject.GetServerUID())
call stoCompModellerObj.performStorageComponentModelling(stoContList, stoEnclList, stoEnclEMMList, stoEnclPSList, stoPhyDiskList, stoVirtDiskList, stoEnclFanSensorList, stoEnclTempSensorList, stoContBatteryList, stoExtenderList, stoBackPlaneList, stoPDList)
Set oServInst = discoveryHelperObject.getServerInstance()
Set oStoInst = stoCompModellerObj.getStorageInstance()
Set oServStoRelationship = omAPIHelper.CreateRelationshipInstance("$MPElement[Name='DellModelServer!DellServer.Contains.Storage']$", oServInst, oStoInst)
omAPIHelper.AddInstanceToDiscoveryData oServStoRelationship
log.MOMDebugLog 1, "Submitting server and storage Discovery data...."
Call omAPIHelper.SubmitDiscoveryData()
profileDictCreatorObj.destroyCOMObjects()
Set profileDictCreatorObj = Nothing
profDictReader.destroyCOMObjects()
set profDictReader = Nothing
protFactoryObj.destroyCOMObjects()
Set protFactoryObj = Nothing
componentInventoryProfileHandle.RemoveAll
Set componentInventoryProfileHandle = Nothing
invDataParser.destroyCOMObjects()
Set invDataParser = Nothing
protocolHelperOject.ClearProfileDictionary()
set protocolHelperOject = Nothing
stoCompModellerObj.destroyCOMObjects()
set stoCompModellerObj = Nothing
discoveryHelperObject.destroyCOMObjects()
set discoveryHelperObject = Nothing
omAPIHelper.destroyCOMObjects()
set omAPIHelper = Nothing
Dim compObj
For Each compObj In compObjectList
compObj.destroyCOMObjects()
set compObj = Nothing
Next
'Calling Code to Configuration Class
Dim ConfigureObject
log.MOMDebugLog 1, "Trap Config code start"
Set ConfigureObject=New TrapConfigurationClass
ConfigureObject.ConfigureTrapDest()
log.MOMDebugLog 1, "Trap Config code done"
ConfigureObject.DeleteComObject()
Set ConfigureObject = Nothing
Else
' Not proceeding with the discovery...
' Submit empty discovery data (discovery sink)
Set discoveryHelperObject = New DiscoveryHelper
Call discoveryHelperObject.CreateAndSubmitEmptyDiscoveryData()
discoveryHelperObject.destroyCOMObjects()
set discoveryHelperObject = Nothing
End If
Else
'**************************************************************************************************
'Discoverydata invocation for Un-Managed Server
'**************************************************************************************************
Set discoveryHelperObject = New DiscoveryHelper
If isServerManaged = "False" And serverGeneration = "NA" Then
'Create class instance and properties and submit the scom discovery data
Call discoveryHelperObject.CreateUnmanagedServerObjectAndSubmitDiscovery()
discoveryHelperObject.destroyCOMObjects()
set discoveryHelperObject = Nothing
End If
End If
'#################################################################################################################################
'Trap Configuration Class will set the trap Destination with the MS IP address/FQDN
'#################################################################################################################################
class TrapConfigurationClass
Dim TrapObj
Public Function ConfigureTrapDest()
Dim TrapResult
Set TrapObj= CreateObject("OOBHelper.Wsman")
if(IsNull(TrapObj)) Then
log.MOMDebugLog 1, "The COM object is NULL"
else
TrapObj.UserName = protParameterObj.getProtocolParameterValue("UserName")
log.MOMDebugLog 1, "The MS IP Address String is " & msIPAddress
log.MOMDebugLog 1, "The Principal Name is " & principalName
log.MOMDebugLog 1, "The SendFQDN flag is " & SendMSFQN
log.MOMDebugLog 1, "Call Trap Configuration Method"
if(SendMSFQN = "true" ) Then
TrapResult = TrapObj.ConfigureTrapDestination(msIPAddress, principalName)
else
TrapResult = TrapObj.ConfigureTrapDestination(msIPAddress, "")
End if
log.MOMDebugLog 1, "Result obtained ::" & TrapResult
if(TrapResult = "AlreadyConfigured") Then
log.MOMDebugLog 1, "The Trap Destination is Already Configured"
End if
if(TrapResult = "NoFreeSlotAvailable") Then
log.MOMDebugLog 1, "There is no free slot available"
End if
if(TrapResult = "FieldIsReadOnly") Then
log.MOMDebugLog 1, "The Trap Destination Field is Read Only"
End if
if(TrapResult = "UpdatedSuccess") Then
log.MOMDebugLog 1, "It was not configured earlier. The update of Ms ipaddress is successful"
End if
if(TrapResult = "UpdateFailure") Then
log.MOMDebugLog 1, "It was not configured earlier. The update of Ms ipaddress is Not successful"
End if
End if
End Function
Public Function DeleteComObject
set TrapObj = Nothing
End Function
End Class
'**************************************************************************************************
'Storage Component Modeller code
'**************************************************************************************************
Class StorageComponentModeller
Private Sub Class_Initialize
Set m_connectorEnclosureMappingDict = CreateObject("Scripting.Dictionary")
m_connectorEnclosureMappingDict.CompareMode = vbTextCompare
Set m_enclosurePhysicalDiskMappingDict = CreateObject("Scripting.Dictionary")
m_enclosurePhysicalDiskMappingDict.CompareMode = vbTextCompare
Set m_enclosurePowerSupplyMappingDict = CreateObject("Scripting.Dictionary")
m_enclosurePowerSupplyMappingDict.CompareMode = vbTextCompare
Set m_enclosureEMMMappingDict = CreateObject("Scripting.Dictionary")
m_enclosureEMMMappingDict.CompareMode = vbTextCompare
Set m_enclosureFanSensorMappingDict = CreateObject("Scripting.Dictionary")
m_enclosureFanSensorMappingDict.CompareMode = vbTextCompare
Set m_enclosureTempSensorMappingDict = CreateObject("Scripting.Dictionary")
m_enclosureTempSensorMappingDict.CompareMode = vbTextCompare
Set m_controllerBatteryMappingDict = CreateObject("Scripting.Dictionary")
m_controllerBatteryMappingDict.CompareMode = vbTextCompare
Set m_controllerPhysicalDiskMappingDict = CreateObject("Scripting.Dictionary")
m_controllerPhysicalDiskMappingDict.CompareMode = vbTextCompare
Set m_controllerVirtualDiskMappingDict = CreateObject("Scripting.Dictionary")
m_controllerVirtualDiskMappingDict.CompareMode = vbTextCompare
Set m_pciessdBackPlaneMappingDIct = CreateObject("Scripting.Dictionary")
m_pciessdBackPlaneMappingDIct.CompareMode = vbTextCompare
Set m_pciessdphysicalDiskMappingDIct = CreateObject("Scripting.Dictionary")
m_pciessdphysicalDiskMappingDIct.CompareMode = vbTextCompare
End Sub
Public Function destroyCOMObjects()
m_connectorEnclosureMappingDict.RemoveAll
m_enclosurePhysicalDiskMappingDict.RemoveAll
m_enclosurePowerSupplyMappingDict.RemoveAll
m_enclosureEMMMappingDict.RemoveAll
m_enclosureFanSensorMappingDict.RemoveAll
m_enclosureTempSensorMappingDict.RemoveAll
m_controllerBatteryMappingDict.RemoveAll
m_controllerPhysicalDiskMappingDict.RemoveAll
m_controllerVirtualDiskMappingDict.RemoveAll
m_pciessdBackPlaneMappingDIct.RemoveAll
m_pciessdphysicalDiskMappingDIct.RemoveALL
set m_connectorEnclosureMappingDict = Nothing
set m_enclosurePhysicalDiskMappingDict = Nothing
set m_enclosurePowerSupplyMappingDict = Nothing
set m_enclosureEMMMappingDict = Nothing
set m_enclosureFanSensorMappingDict = Nothing
set m_enclosureTempSensorMappingDict = Nothing
set m_controllerBatteryMappingDict = Nothing
set m_controllerPhysicalDiskMappingDict = Nothing
set m_controllerVirtualDiskMappingDict = Nothing
set m_pciessdBackPlaneMappingDIct = Nothing
set m_pciessdphysicalDiskMappingDIct = Nothing
End Function
Public Function setMomApiHelper(ByRef mApiHelpObj)
Set m_momApiHelper = mApiHelpObj
End Function
Public Function setServerUID(serverUIDVal)
m_serverUIDVal = serverUIDVal
End Function
Public Function getStorageInstance()
Set getStorageInstance = m_oStoInst
End Function
Public Function performStorageComponentModelling(ByRef contList, enclList, enclEMMList, enclPSList, enclPhyDiskList, enclVirtDiskList, enclFanSensorList, enclTempSensorList, contBatteryList, ByRef ExtenderList, BackPlaneList, PDList)
Dim controllerObj, connectorid, enclObject, intEnclPhysDiskObjList, extEnclPhysDiskObjList, extEnclPSObjList, extEnclEMMObjList, extEnclFanSensorObjList, extEnclTempSensorObjList, contBatteryObjList, contVirtDiskObjList, dasList, connectorList
Dim ExtenderObj, BackPlaneObj, PhysicalDiskObj
Dim className, componentInstance
'Create Storage Component Object
className = "Dell.Server.Storage"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty(className & "/" & "ID", m_serverUIDVal)
Set m_oStoInst = componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Storage")
'CreateClassInstanceForStorage()
For Each controllerObj In contList
'Create Controller Object
className = controllerObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty(className & "/" & "DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, controllerObj, controllerObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForStorageController(controllerObj)
call performControllerBatteryMapping(controllerObj.getAttributevalue("DeviceID"), contBatteryList)
contBatteryObjList = m_controllerBatteryMappingDict.Items
If m_controllerBatteryMappingDict.Count > 0 Then
'Create Controller Sensor Object
className = "Dell.Server.Storage.Controller.Sensor"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty(className & "/" & "ID", "Controller Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Controller Sensor")
call componentInstance.ClearKeyProperties()
'Create Battery Group Object
className = "Dell.Server.Storage.Controller.BatteryGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Sensor/ID", "Controller Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "ID", "Battery Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Battery")
call componentInstance.ClearKeyProperties()
Dim contBatteryObj
For each contBatteryObj In contBatteryObjList
'Create Controller Battery Object
className = contBatteryObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Sensor/ID", "Controller Sensor Group")
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.BatteryGroup/ID", "Battery Group")
call componentInstance.setKeyProperty(className & "/" & "ID", contBatteryObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, contBatteryObj, contBatteryObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForControllerSensor(controllerObj.getAttributevalue("DeviceID"), contBatteryObjList)
Next
m_controllerBatteryMappingDict.RemoveAll
End If
call performControllerPhysicalDiskMapping(controllerObj.getAttributevalue("DeviceID"), enclPhyDiskList)
dasList = m_controllerPhysicalDiskMappingDict.Items
If m_controllerPhysicalDiskMappingDict.Count > 0 Then
Dim dasPhyDiskObj
For Each dasPhyDiskObj In dasList
'Create DAS Physical Disk Object
className = "Dell.Server.Storage.Controller.DirectAttachedPhysicalDisk"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty(className & "/" & "ID", dasPhyDiskObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, dasPhyDiskObj, dasPhyDiskObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForDAS(controllerObj.getAttributevalue("DeviceID"), dasList)
Next
m_controllerPhysicalDiskMappingDict.RemoveAll
End If
call performControllerVirtualDiskMapping(controllerObj.getAttributevalue("DeviceID"), enclVirtDiskList)
contVirtDiskObjList = m_controllerVirtualDiskMappingDict.Items
If m_controllerVirtualDiskMappingDict.Count > 0 Then
'Create Virtual Disk Group Object
className = "Dell.Server.Storage.Controller.VirtualDiskGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty(className & "/" & "Number", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Virtual Disk Group")
call componentInstance.ClearKeyProperties()
Dim contVirtDiskObj
For Each contVirtDiskObj In contVirtDiskObjList
'Create Virtual Disk Object
className = contVirtDiskObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.VirtualDiskGroup/Number", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty(className & "/" & "ID", contVirtDiskObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, contVirtDiskObj, contVirtDiskObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForVirtualDisk(controllerObj.getAttributevalue("DeviceID"), contVirtDiskObjList)
Next
m_controllerVirtualDiskMappingDict.RemoveAll
End If
call performConnectorEnclosureMappingForController(controllerObj.getAttributevalue("DeviceID"), enclList)
connectorList = m_connectorEnclosureMappingDict.Keys
For Each connectorid In connectorList
'Create Connector Object
className = "Dell.Server.Storage.Controller.Connector"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty(className & "/" & "ID", connectorid)
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Connector " & connectorid)
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForStorageControllerConnector(controllerObj.getAttributevalue("DeviceID"), connectorid)
Set enclObject = m_connectorEnclosureMappingDict.Item(connectorid)
m_connectorEnclosureMappingDict.Remove(connectorid)
If Not IsNull(enclObject) Then
'Create Enclosure Object
className = enclObject.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty(className & "/" & "ID", enclObject.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, enclObject, enclObject.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForStorageControllerConnectorEnclosure(controllerObj.getAttributevalue("DeviceID"), connectorid, enclObject)
End If
If (InStr(enclObject.getAttributevalue("ID"), "Internal") <> 0) Then
call performEnclosurePhysicalDiskMapping(enclObject.getAttributevalue("ID"), enclPhyDiskList)
intEnclPhysDiskObjList = m_enclosurePhysicalDiskMappingDict.Items
If m_enclosurePhysicalDiskMappingDict.Count > 0 Then
'Create Internal Physical Disk Group Object
className = "Dell.Server.Storage.Controller.Enclosure.InternalPhysicalDiskGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "Number", enclObject.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Enclosure Physical Disk Group")
call componentInstance.ClearKeyProperties()
Dim intEnclPhysDiskObj
For Each intEnclPhysDiskObj In intEnclPhysDiskObjList
'Create Internal Physical Disk Object
className = "Dell.Server.Storage.Controller.InternalPhysicalDisk"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.InternalPhysicalDiskGroup/Number", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", intEnclPhysDiskObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, intEnclPhysDiskObj, intEnclPhysDiskObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForPhysicalDisks(controllerObj.getAttributevalue("DeviceID"), connectorid, enclObject.getAttributevalue("ID"), intEnclPhysDiskObjList)
Next
m_enclosurePhysicalDiskMappingDict.RemoveAll
End If
ElseIf (InStr(enclObject.getAttributevalue("ID"), "External") <> 0) Then
call performEnclosurePhysicalDiskMapping(enclObject.getAttributevalue("ID"), enclPhyDiskList)
extEnclPhysDiskObjList = m_enclosurePhysicalDiskMappingDict.Items
If m_enclosurePhysicalDiskMappingDict.Count > 0 Then
'Create External Physical Disk Group Object
className = "Dell.Server.Storage.Controller.Enclosure.ExternalPhysicalDiskGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "Number", enclObject.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Enclosure Physical Disk Group")
call componentInstance.ClearKeyProperties()
Dim extEnclPhysDiskObj
For Each extEnclPhysDiskObj In extEnclPhysDiskObjList
'Create External Physical Disk Object
className = "Dell.Server.Storage.Controller.ExternalPhysicalDisk"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.ExternalPhysicalDiskGroup/Number", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", extEnclPhysDiskObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, extEnclPhysDiskObj, extEnclPhysDiskObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForPhysicalDisks(controllerObj.getAttributevalue("DeviceID"), connectorid, enclObject.getAttributevalue("ID"), extEnclPhysDiskObjList)
Next
m_enclosurePhysicalDiskMappingDict.RemoveAll
End If
call performEnclosurePowerSupplyMapping(enclObject.getAttributevalue("ID"), enclPSList)
extEnclPSObjList = m_enclosurePowerSupplyMappingDict.Items
If m_enclosurePowerSupplyMappingDict.Count > 0 Then
'Create Power Supply Group Object
className = "Dell.Server.Storage.Controller.Enclosure.PowerSupplyGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "Number", enclObject.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Enclosure Power Supply Group")
call componentInstance.ClearKeyProperties()
Dim enclPSObj
For Each enclPSObj In extEnclPSObjList
'Create External Power Supply Object
className = enclPSObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.PowerSupplyGroup/Number", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", enclPSObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, enclPSObj, enclPSObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForEnclosurePowerSupply(controllerObj.getAttributevalue("DeviceID"), connectorid, enclObject.getAttributevalue("ID"), extEnclPSObjList)
Next
m_enclosurePowerSupplyMappingDict.RemoveAll
End If
call performEnclosureEMMMapping(enclObject.getAttributevalue("ID"), enclEMMList)
extEnclEMMObjList = m_enclosureEMMMappingDict.Items
If m_enclosureEMMMappingDict.Count > 0 Then
Dim enclEMMObj
For Each enclEMMObj In extEnclEMMObjList
'Create EMM Object
className = enclEMMObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", enclEMMObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, enclEMMObj, enclEMMObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForEnclosureEMM(controllerObj.getAttributevalue("DeviceID"), connectorid, enclObject.getAttributevalue("ID"), extEnclEMMObjList)
Next
m_enclosureEMMMappingDict.RemoveAll
End If
call performEnclosureFanSensorMapping(enclObject.getAttributevalue("ID"), enclFanSensorList)
extEnclFanSensorObjList = m_enclosureFanSensorMappingDict.Items
call performEnclosureTempSensorMapping(enclObject.getAttributevalue("ID"), enclTempSensorList)
extEnclTempSensorObjList = m_enclosureTempSensorMappingDict.Items
If m_enclosureFanSensorMappingDict.Count > 0 Or m_enclosureTempSensorMappingDict.Count > 0 Then
'Create Enclosure Sensor Object
className = "Dell.Server.Storage.Controller.Enclosure.Sensor"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", "Enclosure Sensor" & enclObject.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Sensors")
call componentInstance.ClearKeyProperties()
'Create Fan Sensor Group Object
className = "Dell.Server.Storage.Controller.Enclosure.FanSensorGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.Sensor/ID", "Enclosure Sensor" & enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", "Fan Sensor Group" & enclObject.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Fan Sensors")
call componentInstance.ClearKeyProperties()
'Create Temp Sensor Group Object
className = "Dell.Server.Storage.Controller.Enclosure.TempSensorGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.Sensor/ID", "Enclosure Sensor" & enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", "Temperature Sensor Group" & enclObject.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Temperature Sensors")
call componentInstance.ClearKeyProperties()
Dim enclFanSensorObj
For Each enclFanSensorObj In extEnclFanSensorObjList
'Create Fan Sensor Object
className = enclFanSensorObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.Sensor/ID", "Enclosure Sensor" & enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.FanSensorGroup/ID", "Fan Sensor Group" & enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", enclFanSensorObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, enclFanSensorObj, enclFanSensorObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
Next
Dim enclTempSensorObj
For Each enclTempSensorObj In extEnclTempSensorObjList
'Create Temperature Sensor Object
className = enclTempSensorObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller/DeviceID", controllerObj.getAttributevalue("DeviceID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Connector/ID", connectorid)
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure/ID", enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.Sensor/ID", "Enclosure Sensor" & enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Controller.Enclosure.TempSensorGroup/ID", "Temperature Sensor Group" & enclObject.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", enclTempSensorObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, enclTempSensorObj, enclTempSensorObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
Next
m_enclosureFanSensorMappingDict.RemoveAll
m_enclosureTempSensorMappingDict.RemoveAll
End If
End If
Next
Next
Dim extBackPlaneObjList, extPhysicalDIskObjList,extenderID
'T Extender object
For Each ExtenderObj In ExtenderList
'Create Extender Object
extenderID = ExtenderObj.getAttributevalue("ID")
className = "Dell.Server.Storage.Extender"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty(className & "/" & "ID", ExtenderObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, ExtenderObj, ExtenderObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
'CreateClassInstanceForStorageExtender(ExtenderObj)
log.MOMDebugLog 1, "2.KeyProperty of Dell.Server.Storage.Extender : " & m_serverUIDVal
'Create BackPlane list
call performExtenderBackPlaneMapping(extenderID, BackPlaneList)
extBackPlaneObjList = m_pciessdBackPlaneMappingDIct.Items
For Each BackPlaneObj In extBackPlaneObjList
'Create BackPlane Unit Object
log.MOMDebugLog 1, "1.KeyProperty of Dell.Server.Storage.BackPlane :"
log.MOMDebugLog 1, "1.KeyProperty of Dell.Server.Storage.BackPlane : " & BackPlaneObj.getAttributevalue("ID")
className = "Dell.Server.Storage.Extender.BackPlane"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Storage.Extender/ID", ExtenderObj.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", BackPlaneObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, BackPlaneObj, BackPlaneObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
call performExtenderphysicalDiskMapping(extenderID, PDList)
extPhysicalDIskObjList = m_pciessdphysicalDiskMappingDIct.Items
'Create PhysicalDisk Unit Object
For Each PhysicalDiskObj In extPhysicalDIskObjList
log.MOMDebugLog 1, "1.KeyProperty of Dell.Server.Storage.PD : " & PhysicalDiskObj.getAttributevalue("ID")
className = "Dell.Server.Storage.Extender.PhysicalDisk"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server.Storage/ID", m_serverUIDVal)
call componentInstance.setKeyProperty( "Dell.Server.Storage.Extender/ID", ExtenderObj.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server.Storage.Extender.BackPlane/ID", BackPlaneObj.getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", PhysicalDiskObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, PhysicalDiskObj, PhysicalDiskObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
Next
m_pciessdphysicalDiskMappingDIct.RemoveAll
Next
m_pciessdBackPlaneMappingDIct.RemoveAll
Next
End Function
Public Function performConnectorEnclosureMappingForController(ByRef controllerFQDD, ByRef enclosureObjectList)
Dim connectorId, enclosureObject, message
For Each enclosureObject in enclosureObjectList
If (InStr(enclosureObject.getAttributevalue("ID"), controllerFQDD) <> 0) Then
connectorId = enclosureObject.getAttributevalue("Connector")
If (m_connectorEnclosureMappingDict.Exists(connectorId)) Then
message = "Enclosure with same connector Id exist"
Else
m_connectorEnclosureMappingDict.Add connectorId, enclosureObject
message = "Enclosure with connector Id does not exist"
End If
End If
Next
End Function
Public Function performEnclosurePhysicalDiskMapping(ByRef enclFQDD, ByRef enclPhyDiskList)
Dim message, phyDiskFQDD, phyDiskObject
For Each phyDiskObject in enclPhyDiskList
phyDiskFQDD = phyDiskObject.getAttributevalue("ID")
If (InStr(phyDiskFQDD, enclFQDD) <> 0) Then
If (m_enclosurePhysicalDiskMappingDict.Exists(phyDiskFQDD)) Then
message = "Physical Disk with same FQDD exist"
Else
m_enclosurePhysicalDiskMappingDict.Add phyDiskFQDD, phyDiskObject
End If
End If
Next
End Function
Public Function performEnclosurePowerSupplyMapping(ByRef enclFQDD, ByRef enclPSObjectList)
Dim message, enclPSFQDD, enclPSObject
For Each enclPSObject in enclPSObjectList
enclPSFQDD = enclPSObject.getAttributevalue("ID")
If (InStr(enclPSFQDD, enclFQDD) <> 0) Then
If (m_enclosurePowerSupplyMappingDict.Exists(enclPSFQDD)) Then
message = "Power Supply with same FQDD exist"
Else
m_enclosurePowerSupplyMappingDict.Add enclPSFQDD, enclPSObject
End If
End If
Next
End Function
Public Function performEnclosureEMMMapping(ByRef enclFQDD, ByRef enclEMMObjectList)
Dim message, enclEMMFQDD, enclEMMObject
For Each enclEMMObject in enclEMMObjectList
enclEMMFQDD = enclEMMObject.getAttributevalue("ID")
If (InStr(enclEMMFQDD, enclFQDD) <> 0) Then
If (m_enclosureEMMMappingDict.Exists(enclEMMFQDD)) Then
message = "EMM with same FQDD exist"
Else
m_enclosureEMMMappingDict.Add enclEMMFQDD, enclEMMObject
End If
End If
Next
End Function
Public Function performEnclosureFanSensorMapping(ByRef enclFQDD, ByRef enclFanSensorObjectList)
Dim message, enclFanSensorFQDD, enclFanSensorObject
For Each enclFanSensorObject in enclFanSensorObjectList
enclFanSensorFQDD = enclFanSensorObject.getAttributevalue("ID")
If (InStr(enclFanSensorFQDD, enclFQDD) <> 0) Then
If (m_enclosureFanSensorMappingDict.Exists(enclFanSensorFQDD)) Then
message = "Fan Sensor with same FQDD exist"
Else
m_enclosureFanSensorMappingDict.Add enclFanSensorFQDD, enclFanSensorObject
End If
End If
Next
End Function
Public Function performEnclosureTempSensorMapping(ByRef enclFQDD, ByRef enclTempSensorObjectList)
Dim message, enclTempSensorFQDD, enclTempSensorObject
For Each enclTempSensorObject in enclTempSensorObjectList
enclTempSensorFQDD = enclTempSensorObject.getAttributevalue("ID")
If (InStr(enclTempSensorFQDD, enclFQDD) <> 0) Then
If (m_enclosureTempSensorMappingDict.Exists(enclTempSensorFQDD)) Then
message = "Fan Sensor with same FQDD exist"
Else
m_enclosureTempSensorMappingDict.Add enclTempSensorFQDD, enclTempSensorObject
End If
End If
Next
End Function
Public Function performControllerBatteryMapping(ByRef contFQDD, ByRef contBatteryObjectList)
Dim message, contBatteryFQDD, contBatteryObject
For Each contBatteryObject in contBatteryObjectList
contBatteryFQDD = contBatteryObject.getAttributevalue("ID")
If (InStr(contBatteryFQDD, contFQDD) <> 0) Then
If (m_controllerBatteryMappingDict.Exists(contBatteryFQDD)) Then
message = "Controller Sensor with same FQDD exist"
Else
m_controllerBatteryMappingDict.Add contBatteryFQDD, contBatteryObject
End If
End If
Next
End Function
Public Function performControllerPhysicalDiskMapping(ByRef contFQDD, ByRef phyDiskObjectList)
Dim message, phyDiskFQDD, phyDiskObject, dasDict, dasList
Set dasDict = CreateObject("Scripting.Dictionary")
dasDict.CompareMode = vbTextCompare
For Each phyDiskObject in phyDiskObjectList
If (InStr(phyDiskObject.getAttributevalue("ID"), "Direct") <> 0) Then
dasDict.Add phyDiskObject, "NA"
End If
Next
dasList = dasDict.Keys
If dasDict.Count > 0 Then
For Each phyDiskObject in dasList
phyDiskFQDD = phyDiskObject.getAttributevalue("ID")
If (InStr(phyDiskFQDD, contFQDD) <> 0) Then
If (m_controllerPhysicalDiskMappingDict.Exists(phyDiskFQDD)) Then
message = "Direct Attached Disk with same FQDD exist"
Else
m_controllerPhysicalDiskMappingDict.Add phyDiskFQDD, phyDiskObject
End If
End If
Next
End If
End Function
Public Function performControllerVirtualDiskMapping(ByRef contFQDD, ByRef virtDiskObjectList)
Dim message, virtDiskFQDD, virtDiskObject
For Each virtDiskObject in virtDiskObjectList
virtDiskFQDD = virtDiskObject.getAttributevalue("ID")
If (InStr(virtDiskFQDD, contFQDD) <> 0) Then
If (m_controllerVirtualDiskMappingDict.Exists(virtDiskFQDD)) Then
message = "Virtual Disk with same FQDD exist"
Else
m_controllerVirtualDiskMappingDict.Add virtDiskFQDD, virtDiskObject
End If
End If
Next
End Function
Public Function performExtenderBackPlaneMapping(ByRef bpFQDD, ByRef backPlaneObjectList)
Dim message, backPlaneFQDD, backPlaneObject
For Each backPlaneObject in backPlaneObjectList
backPlaneFQDD = backPlaneObject.getAttributevalue("ID")
If (InStr(backPlaneFQDD, bpFQDD) <> 0) Then
If (m_pciessdBackPlaneMappingDIct.Exists(backPlaneFQDD)) Then
message = "Extender BackPlane with same FQDD exist"
Else
m_pciessdBackPlaneMappingDIct.Add backPlaneFQDD, backPlaneObject
End If
End If
Next
End Function
Public Function performExtenderphysicalDiskMapping(ByRef pdFQDD, ByRef extphysicalDiskObjectList)
Dim message, physicalDiskFQDD, physicaldiskObject
For Each physicaldiskObject in extphysicalDiskObjectList
physicalDiskFQDD = physicaldiskObject.getAttributevalue("ID")
If (InStr(physicalDiskFQDD, pdFQDD) <> 0) Then
If (m_pciessdphysicalDiskMappingDIct.Exists(physicalDiskFQDD)) Then
message = "Extender PhysicalDisk with same FQDD exist"
Else
m_pciessdphysicalDiskMappingDIct.Add physicalDiskFQDD, physicaldiskObject
End If
End If
Next
End Function
Private Sub Class_Initialize
Set m_momApiHelper = New MOMAPIHelper
End Sub
Public Function GetMomAPIHelper()
Set GetMomAPIHelper = m_momApiHelper
End Function
Public Function destroyCOMObjects()
m_momApiHelper.destroyCOMObjects()
Set m_momApiHelper = Nothing
End Function
Public Function GetServerUID()
GetServerUID = m_serverUIDVal
End Function
Public Function GetServiceTag()
GetServiceTag = m_serviceTag
End Function
Public Function GetNodeID()
GetNodeID = m_serverNodeID
End Function
Public Function getServerInstance()
Set getServerInstance = m_oServerInst
End Function
Function CreateClassInstanceAndProperties(compObjectList, serverObjType)
Call m_momApiHelper.CreateDiscoveryData(SourceId, ManagedEntityId)
Dim className, componentInstance, oInst, oSMASHInst, oRelationship
Dim sdCardList, compObjListFilter, serverList, procUnitList, memUnitList, psUnitList, biosList, idracList, nicList, licenseList, licenseGroupList,nicCapabilitiesList, aggregationMetricList
Dim HostNICList, HostNICGroupList, objectIdracEnumeration, idracEnumerationList
Dim raidEnumerationList , objectRaidEnumeration, physicalDiskList, objectPhysicalDisc, raidEnumerationFQDD, physicalDiscID
'Following lines are added to map "DCIM_RaidEnumeration"."RaidNegotiatedSpeed" with each "Dell.Server.Storage.Controller.PhysicalDisk"."NegotiatedSpeed"
Set compObjListFilter = New ComponentObjectListFilter
physicalDiskList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.PhysicalDisk")
Set compObjListFilter = New ComponentObjectListFilter
raidEnumerationList= compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.Storage.Controller.InternalPhysicalDisk.RAIDEnumeration")
If (ArrayCount(raidEnumerationList) > 0) Then
For Each objectPhysicalDisc In physicalDiskList
physicalDiscID = Trim(objectPhysicalDisc.getAttributevalue("ID"))
For Each objectRaidEnumeration In raidEnumerationList
If (objectRaidEnumeration.getAttributevalue("RaidEnumeration_AttributeName") = "RAIDNegotiatedSpeed") Then
raidEnumerationFQDD = Trim(objectRaidEnumeration.getAttributevalue("RaidEnumeration_FQDD"))
If raidEnumerationFQDD = physicalDiscID Then
Call objectPhysicalDisc.modifyExistingAttributeValue("NegotiatedSpeed", objectRaidEnumeration.getAttributevalue("RaidEnumeration_CurrentValue"))
log.MOMDebugLog 1, "Negotiated Speed is " & objectPhysicalDisc.getAttributevalue("NegotiatedSpeed")
End If
End If
Next
Next
End If
Set compObjListFilter = New ComponentObjectListFilter
serverList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server")
'Following lines are added to get DCIM_IDRACCardEnumeration values and populate these values to idracEnumerationList
'Later this idracEnumerationList will be used to map DCIM_IDRACCardEnumeration->SystemLockdown to Dell.Server->SystemLockdown and
' DCIM_IDRACCardEnumeration->Status(InstanceID="iDRAC.Embedded.1#GroupManager.1#Status") to Dell.Server.IDRAC -> GroupStatus
Set compObjListFilter = New ComponentObjectListFilter
idracEnumerationList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.IdracEnumeration")
If (ArrayCount(idracEnumerationList) > 0) Then
For Each objectIdracEnumeration In idracEnumerationList
If (objectIdracEnumeration.getAttributevalue("IdracEnumeration_AttributeName") = "SystemLockdown") Then
Call serverList(0).modifyExistingAttributeValue("SystemLockdown", objectIdracEnumeration.getAttributevalue("IdracEnumeration_CurrentValue"))
log.MOMDebugLog 1, "SystemLockdown Value is " & serverList(0).getAttributevalue("SystemLockdown")
End If
Next
End If
Dim strList, strObj
Set compObjListFilter = New ComponentObjectListFilter
strList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.OSDetails")
If (ArrayCount(strList) > 0) Then
For Each strObj In strList
If (strObj.getAttributevalue("OperatingSystem_property") = "OSName") Then
Call serverList(0).modifyExistingAttributeValue("OperatingSystem", strObj.getAttributevalue("OperatingSystem_currentValue"))
log.MOMDebugLog 1, "Operating System is " & serverList(0).getAttributevalue("OperatingSystem")
End If
If (strObj.getAttributevalue("OperatingSystemVersion_property") = "OSVersion") Then
Call serverList(0).modifyExistingAttributeValue("OperatingSystemVersion", strObj.getAttributevalue("OperatingSystemVersion_currentValue"))
log.MOMDebugLog 1, "Operating System Version is " & serverList(0).getAttributevalue("OperatingSystemVersion")
End If
Next
End If
Dim prePopulatorMapperObj: Set prePopulatorMapperObj = new PrePopulatorMapper
call prePopulatorMapperObj.PrePopulateFields(serverList(0), protParameterObj)
If serverObjType = "Monolithic Server" Then
'Create Monolithic Server Object
className = "Dell.Server.MonolithicServer"
m_serverUIDVal = serverList(0).getAttributevalue("ServiceTag")
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
Set oInst = componentInstance.CreateAndPopulateInstance(m_momApiHelper, serverList(0), serverList(0).getAttributevalue("HostName"))
call componentInstance.ClearKeyProperties()
ElseIf serverObjType = "Modular Server" Then
'Create Modular Server object
className = "Dell.Server.ModularBlade"
m_serverUIDVal = serverList(0).getAttributevalue("ServiceTag")
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
Set oInst = componentInstance.CreateAndPopulateInstance(m_momApiHelper, serverList(0), serverList(0).getAttributevalue("HostName"))
call componentInstance.ClearKeyProperties()
ElseIf serverObjType = "Sled Server" Then
'Create Modular Server object
className = "Dell.Server.Sled.WithoutOS"
m_serverUIDVal = serverList(0).getAttributevalue("ServiceTag")
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
Set oInst = componentInstance.CreateAndPopulateInstance(m_momApiHelper, serverList(0), serverList(0).getAttributevalue("HostName"))
call componentInstance.ClearKeyProperties()
ElseIf serverObjType = "Dell Rack WorkStation" Then
'Create Dell Rack WorkStation Server object
className = "Dell.Server.RackWorkstation"
m_serverUIDVal = serverList(0).getAttributevalue("ServiceTag")
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
Set oInst = componentInstance.CreateAndPopulateInstance(m_momApiHelper, serverList(0), serverList(0).getAttributevalue("HostName"))
call componentInstance.ClearKeyProperties()
ElseIf serverObjType = "Sled FM Server" Then
'Create Modular Server object
className = "Dell.Server.SledNode.WithoutOS"
m_serverUIDVal = serverList(0).getAttributevalue("NodeID")
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
Set oInst = componentInstance.CreateAndPopulateInstance(m_momApiHelper, serverList(0), serverList(0).getAttributevalue("HostName"))
call componentInstance.ClearKeyProperties()
End If
Set m_oServerInst = oInst
'Create Dell SMASH Object
className = "Dell.Server.SMASHDevice"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.SystemCenter.OOB.WSManDevice/IP", protParameterObj.getProtocolParameterValue("IPAddress"))
Set oSMASHInst = componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "")
call componentInstance.ClearKeyProperties()
If serverObjType = "Monolithic Server" Then
Set oRelationship = m_momApiHelper.CreateRelationshipInstance("$MPElement[Name='DellMonolithicServer.Contains.DellSMASHDevice']$", oInst, oSMASHInst)
ElseIf serverObjType = "Modular Server" Then
Set oRelationship = m_momApiHelper.CreateRelationshipInstance("$MPElement[Name='DellModularBlade.Contains.DellSMASHDevice']$", oInst, oSMASHInst)
ElseIf serverObjType = "Sled Server" Then
Set oRelationship = m_momApiHelper.CreateRelationshipInstance("$MPElement[Name='DellSled.Contains.DellSMASHDevice']$", oInst, oSMASHInst)
ElseIf serverObjType = "Sled FM Server" Then
Set oRelationship = m_momApiHelper.CreateRelationshipInstance("$MPElement[Name='DellSledNode.Contains.DellSMASHDevice']$", oInst, oSMASHInst)
ElseIf serverObjType = "Dell Rack WorkStation" Then
Set oRelationship = m_momApiHelper.CreateRelationshipInstance("$MPElement[Name='DellRackWorkStation.Contains.DellSMASHDevice']$", oInst, oSMASHInst)
End If
m_momApiHelper.AddInstanceToDiscoveryData oSMASHInst
m_momApiHelper.AddInstanceToDiscoveryData oRelationship
Set compObjListFilter = New ComponentObjectListFilter
aggregationMetricList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.AvgCUPSUtilizationPerDay")
If ArrayCount(aggregationMetricList) > 0 Then
Dim aggregationMetricUnitObj, instIndex
For Each aggregationMetricUnitObj In aggregationMetricList
instIndex = aggregationMetricUnitObj.getAttributevalue("ID")
If (Instr(Lcase(instIndex),"systemboard") and Instr(Lcase(instIndex),"avg") and Instr(Lcase(instIndex),"sysusage") and Instr(Lcase(instIndex),"1d")) Then
'Create AvgCUPSUtilizationPerDay Object
log.MOMDebugLog 1, "Avg CUPS Utilization Per Day Instance " & instIndex
className = "Dell.Server.AvgCUPSUtilizationPerDay"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.AvgCUPSUtilizationPerDay/ID", "Dell Server Capacity Threshold Check")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Dell Server Capacity Threshold Check")
call componentInstance.ClearKeyProperties()
End If
Next
End If
Set compObjListFilter = New ComponentObjectListFilter
procUnitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.ProcUnit")
If ArrayCount(procUnitList) > 0 Then
'Create processor Group Object
className = "Dell.Server.Processors"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Processors/ID", "Processor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Processors")
call componentInstance.ClearKeyProperties()
Dim procUnitObj
For Each procUnitObj In procUnitList
'Create Processor Unit Objects
className = procUnitObj.getMgmtConsoleClassName()
WScript.Echo "className : " & className
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Processors/ID", "Processor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", procUnitObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, procUnitObj, procUnitObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
Next
End If
Set compObjListFilter = New ComponentObjectListFilter
memUnitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.MemoryUnit")
If ArrayCount(memUnitList) > 0 Then
'Create Memory Group Object
className = "Dell.Server.Memory"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Memory/ID", "Memory Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Memory")
call componentInstance.ClearKeyProperties()
Dim memUnitObj
For Each memUnitObj In memUnitList
'Create Memory Unit Objects
className = memUnitObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Memory/ID", "Memory Group")
call componentInstance.setKeyProperty(className & "/" & "ID", memUnitObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, memUnitObj, memUnitObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
Next
End If
Set compObjListFilter = New ComponentObjectListFilter
licenseList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.License")
If ArrayCount(licenseList) > 0 Then
'Create License Group Object
className = "Dell.Server.LicenseGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.LicenseGroup/ID", "License Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "License Group")
call componentInstance.ClearKeyProperties()
'create license object
className = "Dell.Server.License"
Dim licenseUnitObj
For Each licenseUnitObj In licenseList
'Create License Unit Objects
className = licenseUnitObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty(className & "/" & "ID", licenseUnitObj.getAttributevalue("ID"))
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.LicenseGroup/ID", "License Group") 'All parent keys to be mentioned
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, licenseUnitObj)
call componentInstance.ClearKeyProperties()
Next
End If
Set compObjListFilter = New ComponentObjectListFilter
sdCardList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.SDCard")
If ArrayCount(sdCardList) > 0 Then
'Create SDCard Group Object
className = "Dell.Server.SDCardGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.SDCardGroup/ID", "SD Card Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "SD Card Group")
call componentInstance.ClearKeyProperties()
'create SDCard object
className = "Dell.Server.SDCard"
Dim sdCardUnitObj
For Each sdCardUnitObj In sdCardList
'Create sdCard Unit Objects
className = sdCardUnitObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.SDCardGroup/ID", "SD Card Group") 'All parent keys to be mentioned
call componentInstance.setKeyProperty(className & "/" & "ID", sdCardUnitObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, sdCardUnitObj)
call componentInstance.ClearKeyProperties()
Next
End If
Set compObjListFilter = New ComponentObjectListFilter
HostNICList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.HostNIC")
If isHostNICManaged = "True" Then
'If ArrayCount(HostNICList) > 0 Then
log.MOMDebugLog 1, "HOST_NIC list is greater than 0"
'Create HostNIC Group Object
className = "Dell.Server.HostNICGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.HostNICGroup/ID", "HostNIC Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "HostNIC Group")
call componentInstance.ClearKeyProperties()
'create HostNIC object
className = "Dell.Server.HostNIC"
Dim HostNICUnitObj
For Each HostNICUnitObj In HostNICList
If (Instr(Lcase(HostNICUnitObj.getAttributevalue("DeviceFQDD")),"not available")) Then
log.MOMDebugLog 1, "HOST_NIC DeviceFQDD is " &(HostNICUnitObj.getAttributevalue("DeviceFQDD"))
Else
'If not HostNICUnitObj.getAttributevalue("DeviceFQDD") is null Then
'Create HostNIC Unit Object
className = HostNICUnitObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty(className & "/" & "InstanceID", HostNICUnitObj.getAttributevalue("InstanceID"))
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.HostNICGroup/ID", "HostNIC Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, HostNICUnitObj)
call componentInstance.ClearKeyProperties()
End If
Next
'End If
End If
Set compObjListFilter = New ComponentObjectListFilter
psUnitList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.PSUnit")
If ArrayCount(psUnitList) > 0 Then
'Create PowerSupply Group Object
className = "Dell.Server.PowerSupplies"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.PowerSupplies/ID", "Power Supply Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Power Supply")
call componentInstance.ClearKeyProperties()
Dim psUnitObj
For Each psUnitObj In psUnitList
'Create PS Unit Objects
className = psUnitObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.PowerSupplies/ID", "Power Supply Group")
call componentInstance.setKeyProperty(className & "/" & "ID", psUnitObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, psUnitObj, psUnitObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
Next
End If
Set compObjListFilter = New ComponentObjectListFilter
biosList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.BIOS")
If ArrayCount(biosList) > 0 Then
'Create BIOS Object
className = biosList(0).getMgmtConsoleClassName()
Dim softwareIdentityObjList, softwareIdentityObj
Set compObjListFilter = New ComponentObjectListFilter
softwareIdentityObjList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.SoftwareIdentity")
If (ArrayCount(softwareIdentityObjList) > 0) Then
For Each softwareIdentityObj In softwareIdentityObjList
If ((softwareIdentityObj.getAttributevalue("ComponentType") = "BIOS") And (InStr(softwareIdentityObj.getAttributevalue("InstanceID"), "INSTALLED#") > 0)) Then
Call biosList(0).modifyExistingAttributeValue("Name", softwareIdentityObj.getAttributevalue("FQDD"))
Call biosList(0).modifyExistingAttributeValue("SMBIOSBIOSVersion", softwareIdentityObj.getAttributevalue("VersionString"))
Call biosList(0).modifyExistingAttributeValue("SMBIOSMajorVersion", softwareIdentityObj.getAttributevalue("MajorVersion"))
Call biosList(0).modifyExistingAttributeValue("SMBIOSMinorVersion", softwareIdentityObj.getAttributevalue("MinorVersion"))
Call biosList(0).modifyExistingAttributeValue("SMBIOSPresent", "True")
Exit For
End If
Next
End If
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty(className & "/" & "SerialNumber", biosList(0).getAttributevalue("SerialNumber"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, biosList(0), biosList(0).getAttributevalue("SerialNumber"))
call componentInstance.ClearKeyProperties()
End If
If ( generation > 13 ) Then
groupName = "Not Available"
groupStatus = "Not Available"
End If
Set compObjListFilter = New ComponentObjectListFilter
idracList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.iDRAC")
log.MOMDebugLog 1, "isiDRACNicEnableFlag before idracnic inventory value is: " & iDRACNicEnabled
If generation > 13 Then
Set compObjListFilter = New ComponentObjectListFilter
nicSwitchConnection = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.NIC.Switchconnection")
End If
If iDRACNicEnabled = False Then
If ArrayCount(idracList) > 0 Then
'Create iDrac Object
Call idracList(0).modifyExistingAttributeValue("GroupName", groupName)
Call idracList(0).modifyExistingAttributeValue("GroupStatus", groupStatus)
log.MOMDebugLog 1, "Idrac Group Name = " & idracList(0).getAttributevalue("GroupName")
log.MOMDebugLog 1, "Idrac Group Status = " & idracList(0).getAttributevalue("GroupStatus")
className = idracList(0).getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty(className & "/" & "ID", idracList(0).getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, idracList(0), idracList(0).getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
Dim compObj1, fqdd1, attrValue1
className = "Dell.Server.iDrac.NetworkInterfaceUnit"
Set compObj1 = New Component
compObj1.setMgmtConsoleClassName(className)
fqdd1 = idracList(0).getAttributevalue("ID")
attrValue1 = "Integrated Dell Remote Access Controller"
Call compObj1.setAttributeValue("ID", fqdd1)
Call compObj1.setAttributeValue("ProductName", attrValue1)
log.MOMDebugLog 1, "ID: " & compObj1.getAttributevalue("ID")
log.MOMDebugLog 1, "ProductName: " & compObj1.getAttributevalue("ProductName")
If generation > 13 Then
If (ArrayCount(nicSwitchConnection) > 0) Then
For Each strObj In nicSwitchConnection
If (Instr(fqdd1,strObj.getAttributevalue("FQDD"))) Then
Call compObj1.modifyExistingAttributeValue("SwitchChassisID", strObj.getAttributevalue("SwitchConnectionID"))
Call compObj1.modifyExistingAttributeValue("SwitchPortID", strObj.getAttributevalue("SwitchPortConnectionID"))
End If
Next
Else
Call compObj1.modifyExistingAttributeValue("SwitchChassisID", "Not Available")
Call compObj1.modifyExistingAttributeValue("SwitchPortID", "Not Available")
End If
End If
log.MOMDebugLog 1, "Idrac SwitchChassisID: " & compObj1.getAttributevalue("SwitchChassisID")
log.MOMDebugLog 1, "Idrac SwitchPortID: " & compObj1.getAttributevalue("SwitchPortID")
log.MOMDebugLog 1, "MACAddress: " & compObj1.getAttributevalue("MACAddress")
log.MOMDebugLog 1, "IPv6Address: " & compObj1.getAttributevalue("IPv6Address")
log.MOMDebugLog 1, "Speed: " & compObj1.getAttributevalue("Speed")
log.MOMDebugLog 1, "LinkDuplexMode: " & compObj1.getAttributevalue("LinkDuplexMode")
'Create iDrac NIC Object
className = compObj1.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.iDRAC/ID", idracList(0).getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", compObj1.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compObj1, compObj1.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
End If
else
If ArrayCount(idracList) > 0 Then
Dim idracCardStringList, idracCardEnumerationList, fqdd
Set compObjListFilter = New ComponentObjectListFilter
idracCardStringList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.IdracCardString")
idracCardEnumerationList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.IdracCardEnumeration")
'Create iDrac Object
If (ArrayCount(idracCardStringList) > 0) And (ArrayCount(idracCardEnumerationList) > 0) Then
If ( generation > 13 ) Then
'Adding value for Group Name
fqdd = idracCardStringList(0).getAttributevalue("FQDD")
groupName = findValueInComponentObjectWithAttributeName(idracCardStringList, "AttributeDisplayName", "Group Name", "FQDD", fqdd, "CurrentValue")
For Each objectIdracEnumeration In idracCardEnumerationList
If (objectIdracEnumeration.getAttributevalue("AttributeDisplayName") = "Feature Status") Then
If (objectIdracEnumeration.getAttributevalue("InstanceID") = "iDRAC.Embedded.1#GroupManager.1#Status") Then
groupStatus = objectIdracEnumeration.getAttributevalue("CurrentValue")
Exit For
End If
End If
Next
End If
Call idracList(0).modifyExistingAttributeValue("GroupName", groupName)
log.MOMDebugLog 1, "Group Name = " & idracList(0).getAttributevalue("GroupName")
Call idracList(0).modifyExistingAttributeValue("GroupStatus", groupStatus)
log.MOMDebugLog 1, "Group Status = " & idracList(0).getAttributevalue("GroupStatus")
End If
className = idracList(0).getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty(className & "/" & "ID", idracList(0).getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, idracList(0), idracList(0).getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
If (ArrayCount(idracCardStringList) > 0) And (ArrayCount(idracCardEnumerationList) > 0) Then
Dim compObj, attrValue
className = "Dell.Server.iDrac.NetworkInterfaceUnit"
Set compObj = New Component
compObj.setMgmtConsoleClassName(className)
fqdd = idracCardStringList(0).getAttributevalue("FQDD")
attrValue = findValueInComponentObjectWithAttributeName(idracCardStringList, "AttributeDisplayName", "iDRAC Product Information", "FQDD", fqdd, "CurrentValue")
If attrValue = "" Then
attrValue = "Not Available"
End If
Call compObj.setAttributeValue("ID", fqdd)
Call compObj.setAttributeValue("ProductName", attrValue)
attrValue = findValueInComponentObjectWithAttributeName(idracCardStringList, "AttributeDisplayName", "MAC Address", "FQDD", fqdd, "CurrentValue")
If attrValue = "" Then
attrValue = "Not Available"
End If
Call compObj.setAttributeValue("MACAddress", attrValue)
attrValue = findValueInComponentObjectWithAttributeName(idracCardStringList, "AttributeDisplayName", "IPv4 Address", "FQDD", fqdd, "CurrentValue")
If attrValue = "" Then
attrValue = "Not Available"
End If
Call compObj.setAttributeValue("IPv4Address", attrValue)
attrValue = findValueInComponentObjectWithAttributeName(idracCardStringList, "AttributeDisplayName", "IPV6 Address 1", "FQDD", fqdd, "CurrentValue")
If attrValue = "::" Or attrValue = "" Then
attrValue = "Not Available"
End If
Call compObj.setAttributeValue("IPv6Address", attrValue)
attrValue = findValueInComponentObjectWithAttributeName(idracCardEnumerationList, "AttributeDisplayName", "NIC Speed", "FQDD", fqdd, "CurrentValue")
If attrValue = "" Then
attrValue = "Not Available"
End If
Call compObj.setAttributeValue("Speed", attrValue)
attrValue = findValueInComponentObjectWithAttributeName(idracCardEnumerationList, "AttributeDisplayName", "NIC Duplex", "FQDD", fqdd, "CurrentValue")
If attrValue = "" Then
attrValue = "Not Available"
End If
Call compObj.setAttributeValue("LinkDuplexMode", attrValue)
If generation > 13 Then
If (ArrayCount(nicSwitchConnection) > 0) Then
For Each strObj In nicSwitchConnection
If (InStr(strObj.getAttributevalue("FQDD"), fqdd)) Then
Call compObj.modifyExistingAttributeValue("SwitchChassisID", strObj.getAttributevalue("SwitchConnectionID"))
Call compObj.modifyExistingAttributeValue("SwitchPortID", strObj.getAttributevalue("SwitchPortConnectionID"))
End If
Next
Else
Call compObj.modifyExistingAttributeValue("SwitchChassisID", "Not Available")
Call compObj.modifyExistingAttributeValue("SwitchPortID", "Not Available")
End If
End If
log.MOMDebugLog 1, "Idrac SwitchChassisID: " & compObj.getAttributevalue("SwitchChassisID")
log.MOMDebugLog 1, "Idrac SwitchPortID: " & compObj.getAttributevalue("SwitchPortID")
'Create iDrac NIC Object
className = compObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.iDRAC/ID", idracList(0).getAttributevalue("ID"))
call componentInstance.setKeyProperty(className & "/" & "ID", compObj.getAttributevalue("ID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compObj, compObj.getAttributevalue("ID"))
call componentInstance.ClearKeyProperties()
End If
End If
End If
Dim nicObj, bNICCapabilitiesMatched, nicCapabilitiesObj, nicID, nicCapabilitiesID, nicDetailsList
Set compObjListFilter = New ComponentObjectListFilter
nicList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.NetworkInterfaceUnit")
Set compObjListFilter = New ComponentObjectListFilter
nicDetailsList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.NICDetails")
Set compObjListFilter = New ComponentObjectListFilter
nicCapabilitiesList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.NetworkInterfaceUnit.Capabilities")
If ArrayCount(nicList) > 0 Then
'Create NIC Group Object
className = "Dell.Server.NICGroup"
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.NICGroup/ID", "NIC Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Network Interface Card Group")
call componentInstance.ClearKeyProperties()
'Create Nic object
For Each nicObj In nicList
bNICCapabilitiesMatched = vbFalse
nicID = nicObj.getAttributevalue("ID")
For Each nicCapabilitiesObj in nicCapabilitiesList
nicCapabilitiesID = nicCapabilitiesObj.getAttributevalue("ID")
if InStr(nicID, nicCapabilitiesID) Then
bNICCapabilitiesMatched = vbTrue
Exit for
End If
Next
If (ArrayCount(nicDetailsList) > 0) Then
For Each strObj In nicDetailsList
If ((strObj.getAttributevalue("VirtualMACAddress_property") = "VirtMacAddr") And (strObj.getAttributevalue("FQDD") = nicID)) Then
Call nicObj.modifyExistingAttributeValue("VirtualMACAddress", strObj.getAttributevalue("VirtualMACAddress_currentValue"))
End If
Next
End If
If generation > 13 Then
If (ArrayCount(nicSwitchConnection) > 0) Then
For Each strObj In nicSwitchConnection
If (strObj.getAttributevalue("FQDD") = nicID) Then
Call nicObj.modifyExistingAttributeValue("SwitchChassisID", strObj.getAttributevalue("SwitchConnectionID"))
Call nicObj.modifyExistingAttributeValue("SwitchPortID", strObj.getAttributevalue("SwitchPortConnectionID"))
End If
Next
Else
Call nicObj.modifyExistingAttributeValue("SwitchChassisID", "Not Available")
Call nicObj.modifyExistingAttributeValue("SwitchPortID", "Not Available")
End If
End If
className = nicObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.NICGroup/ID", "NIC Group")
call componentInstance.setKeyProperty(className & "/" & "ID", nicObj.getAttributevalue("ID"))
if bNICCapabilitiesMatched = vbFalse Then
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, nicObj, Nothing, nicObj.getAttributevalue("ID"))
Else
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, nicObj, nicCapabilitiesObj, nicObj.getAttributevalue("ID"))
End If
call componentInstance.ClearKeyProperties()
Next
End If
Dim numericSensorObjList, sensorObjList, numericSensorbj
Set compObjListFilter = New ComponentObjectListFilter
numericSensorObjList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.NumericSensor")
Set compObjListFilter = New ComponentObjectListFilter
sensorObjList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Sensor")
If ((ArrayCount(numericSensorObjList) > 0) Or (ArrayCount(sensorObjList) > 0)) Then
'Create Sensors Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.Sensors")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Sensors")
call componentInstance.ClearKeyProperties()
If (ArrayCount(numericSensorObjList) > 0) Then
Dim compoObj
For Each numericSensorbj In numericSensorObjList
If (numericSensorbj.getAttributevalue("SensorType") = "2") Then
If tempFlag = False Then
'Create Temperature Sensor Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.TemperatureSensorGroup")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.TemperatureSensorGroup/ID", "Temperature Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Temperature Sensor Group")
call componentInstance.ClearKeyProperties()
tempFlag = True
End If
Set compoObj = New Component
className = "Dell.Server.TemperatureSensor"
Call compoObj.setMgmtConsoleClassName(className)
Call compoObj.setAttributeValue("DeviceID", numericSensorbj.getAttributevalue("DeviceID"))
Call compoObj.setAttributeValue("ElementName", numericSensorbj.getAttributevalue("ElementName"))
'Create Temperature Sensor Objects
className = compoObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.TemperatureSensorGroup/ID", "Temperature Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compoObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compoObj, compoObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
If (numericSensorbj.getAttributevalue("SensorType") = "4") Then
If curFlag = False Then
'Create Current Sensor Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.CurrentSensorGroup")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.CurrentSensorGroup/ID", "Current Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Current Sensor Group")
call componentInstance.ClearKeyProperties()
curFlag = True
End If
Set compoObj = New Component
className = "Dell.Server.CurrentSensor"
Call compoObj.setMgmtConsoleClassName(className)
Call compoObj.setAttributeValue("DeviceID", numericSensorbj.getAttributevalue("DeviceID"))
Call compoObj.setAttributeValue("ElementName", numericSensorbj.getAttributevalue("ElementName"))
'Create Current Sensor Objects
className = compoObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.CurrentSensorGroup/ID", "Current Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compoObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compoObj, compoObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
If (numericSensorbj.getAttributevalue("SensorType") = "5") Then
If fanFlag = False Then
'Create Fan Sensor Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.FanSensorGroup")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.FanSensorGroup/ID", "Fan Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Fan Sensor Group")
call componentInstance.ClearKeyProperties()
fanFlag = True
End If
Set compoObj = New Component
className = "Dell.Server.FanSensor"
Call compoObj.setMgmtConsoleClassName(className)
Call compoObj.setAttributeValue("DeviceID", numericSensorbj.getAttributevalue("DeviceID"))
Call compoObj.setAttributeValue("ElementName", numericSensorbj.getAttributevalue("ElementName"))
'Create Fan Sensor Objects
className = compoObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.FanSensorGroup/ID", "Fan Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compoObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compoObj, compoObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
If (numericSensorbj.getAttributevalue("SensorType") = "3") Then
If voltFlag = False Then
'Create Voltage Sensor Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.VoltageSensorGroup")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.VoltageSensorGroup/ID", "Voltage Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Voltage Sensor Group")
call componentInstance.ClearKeyProperties()
voltFlag = True
End If
Set compoObj = New Component
className = "Dell.Server.VoltageSensor"
Call compoObj.setMgmtConsoleClassName(className)
Call compoObj.setAttributeValue("DeviceID", numericSensorbj.getAttributevalue("DeviceID"))
Call compoObj.setAttributeValue("ElementName", numericSensorbj.getAttributevalue("ElementName"))
'Create Voltage Sensor Objects
className = compoObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.VoltageSensorGroup/ID", "Voltage Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compoObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compoObj, compoObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
Next
End If
If (ArrayCount(sensorObjList) > 0) Then
Dim compnObj, sensorObj
For Each sensorObj In sensorObjList
If (sensorObj.getAttributevalue("SensorType") = "3") Then
If voltFlag = False Then
'Create Voltage Sensor Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.VoltageSensorGroup")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.VoltageSensorGroup/ID", "Voltage Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Voltage Sensor Group")
call componentInstance.ClearKeyProperties()
voltFlag = True
End If
Set compnObj = New Component
className = "Dell.Server.VoltageSensor"
Call compnObj.setMgmtConsoleClassName(className)
Call compnObj.setAttributeValue("DeviceID", sensorObj.getAttributevalue("DeviceID"))
Call compnObj.setAttributeValue("ElementName", sensorObj.getAttributevalue("ElementName"))
'Create Voltage Sensor Objects
className = compnObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.VoltageSensorGroup/ID", "Voltage Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compnObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compnObj, compnObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
If ((sensorObj.getAttributevalue("SensorType") = "1") And (sensorObj.getAttributevalue("OtherSensorTypeDescription") = "Battery")) Then
If batFlag = False Then
'Create Battery Sensor Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.BatterySensorGroup")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.BatterySensorGroup/ID", "Battery Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Battery Sensor Group")
call componentInstance.ClearKeyProperties()
batFlag = True
End If
Set compnObj = New Component
className = "Dell.Server.BatterySensor"
Call compnObj.setMgmtConsoleClassName(className)
Call compnObj.setAttributeValue("DeviceID", sensorObj.getAttributevalue("DeviceID"))
Call compnObj.setAttributeValue("ElementName", sensorObj.getAttributevalue("ElementName"))
'Create Battery Sensor Objects
className = compnObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.BatterySensorGroup/ID", "Battery Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compnObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compnObj, compnObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
If (sensorObj.getAttributevalue("SensorType") = "16") Then
If intFlag = False Then
'Create Intrusion Sensor Group Object
Set componentInstance = creatorFactory.Item("Dell.Server.IntrusionSensorGroup")
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.IntrusionSensorGroup/ID", "Intrusion Sensor Group")
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, componentInstance, "Intrusion Sensor Group")
call componentInstance.ClearKeyProperties()
intFlag = True
End If
Set compnObj = New Component
className = "Dell.Server.IntrusionSensor"
Call compnObj.setMgmtConsoleClassName(className)
Call compnObj.setAttributeValue("DeviceID", sensorObj.getAttributevalue("DeviceID"))
Call compnObj.setAttributeValue("ElementName", sensorObj.getAttributevalue("ElementName"))
'Create Intrusion Sensor Objects
className = compnObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty("Dell.Server.IntrusionSensorGroup/ID", "Intrusion Sensor Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compnObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compnObj, compnObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
Next
End If
End If
'Create PresenceAndStatusSensor Sensor Objects
Dim chassisControllerSensorObjList, chassisControllerSensorObj, elementName
Set compObjListFilter = New ComponentObjectListFilter
chassisControllerSensorObjList = compObjListFilter.fetchRequestedComponentObjectList(compObjectList, "Dell.Server.PresenceAndStatusSensor")
'Create Chassis Controller Sensor Object
For Each chassisControllerSensorObj In chassisControllerSensorObjList
elementName = chassisControllerSensorObj.getAttributevalue("ElementName")
If elementName = "Chassis Controller" Then
Set compoObj = New Component
className = "Dell.Server.PresenceAndStatusSensor"
Call compoObj.setMgmtConsoleClassName(className)
Call compoObj.setAttributeValue("DeviceID", chassisControllerSensorObj.getAttributevalue("DeviceID"))
Call compoObj.setAttributeValue("ElementName", chassisControllerSensorObj.getAttributevalue("ElementName"))
'Create chassis controller Sensor Object
className = compoObj.getMgmtConsoleClassName()
Set componentInstance = creatorFactory.Item(className)
call componentInstance.setKeyProperty("Microsoft.Windows.Computer/PrincipalName", principalName)
call componentInstance.setKeyProperty("Dell.Server/UID", m_serverUIDVal)
call componentInstance.setKeyProperty("Dell.Server.Sensors/ID", "Sensors Group")
call componentInstance.setKeyProperty(className & "/" & "DeviceID", compoObj.getAttributevalue("DeviceID"))
call componentInstance.CreateAndPopulateInstance(m_momApiHelper, compoObj, compoObj.getAttributevalue("DeviceID"))
call componentInstance.ClearKeyProperties()
End If
Next
End Function
Function findValueInComponentObjectWithAttributeName(ByRef ObjStringList, name, value, idName, idValue, valAttr)
Dim obj, attrVal, returnValue, groupIDValue
For Each obj In ObjStringList
attrVal = obj.getAttributevalue(name)
If ((attrVal = value) And (obj.getAttributevalue(idName) = idValue)) Then
If NOT value = "IPv4 Address" Then
returnValue = obj.getAttributevalue(valAttr)
Else
groupIDValue = obj.getAttributevalue("GroupID")
If groupIDValue = "IPv4.1" Then
returnValue = obj.getAttributevalue(valAttr)
Else
log.MOMDEBUGLOG 1, "IDRAC NIC::Ignore the static IP Address: " & obj.getAttributevalue(valAttr)
End If
End If
End If
Next
findValueInComponentObjectWithAttributeName = returnValue
End Function
Function ArrayCount(ByRef array)
Dim index, count
count = 0
For index = 0 To UBound(array)
count = count + 1
Next
ArrayCount = count
End Function
Function CreateUnmanagedServerObjectAndSubmitDiscovery()
Dim oInst, className, componentInstance
Call m_momApiHelper.CreateDiscoveryData(SourceId, ManagedEntityId)
log.MOMDebugLog 1, "Creating Unmanaged Server Instance"
log.MOMDebugLog 1, "Done adding properties of Unmanaged Server Instance"
Call m_momApiHelper.SubmitDiscoveryData()
End Function
'Create Sink object and return discovery data
Function CreateAndSubmitEmptyDiscoveryData()
Dim oInst
Call m_momApiHelper.CreateDiscoveryData(SourceId, ManagedEntityId)
log.MOMDebugLog 1, "Creating Empty Discovery data"
Set oInst = m_momApiHelper.CreateClassInstance("$MPElement[Name='DellOperationsCommon!Dell.Discovery.Sink']$")
call m_momApiHelper.oInstAddProperty(oInst, "$MPElement[Name='System!System.Entity']/DisplayName$", "Dell Discovery Sink")
call m_momApiHelper.oInstAddProperty(oInst, "$MPElement[Name='DellOperationsCommon!Dell.Discovery.Sink']/Name$", principalName)
m_momApiHelper.AddInstanceToDiscoveryData oInst
log.MOMDebugLog 1, "Done Empty Discovery data"
Call m_momApiHelper.SubmitDiscoveryData()
End Function
End Class
'#################################################################################################################################
</ServerDiscoveryScript>
<iDRACNicEnable>false</iDRACNicEnable>
</DataSource>
</Discovery>