Lenovo Flex System Chassis モジュール・ディスカバリー・トリガー

IBM.FlexSystem.Module.Discovery.Trigger (WriteActionModuleType)

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.CommandOutput

Member Modules:

ID Module Type TypeId RunAs 
WA WriteAction Microsoft.Windows.ScriptWriteAction Default

Source Code:

<WriteActionModuleType ID="IBM.FlexSystem.Module.Discovery.Trigger" Accessibility="Internal">
<Configuration>
<xsd:element name="EventID" type="xsd:int"/>
<xsd:element name="IPAddress" type="xsd:string"/>
</Configuration>
<ModuleImplementation>
<Composite>
<MemberModules>
<WriteAction ID="WA" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>IBMFlexChassisModuleDiscoveryTrigger.vbs</ScriptName>
<Arguments>"$Config/EventID$" "$Config/IPAddress$"</Arguments>
<ScriptBody><Script>
Dim EventID, IPAddress

If (WScript.Arguments.Count &lt; 2) Then
WScript.Quit -1
End If
SetLocale("en-us")
EventID = WScript.Arguments.Item(0)
IPAddress = WScript.Arguments.Item(1)

'License control need to be added.

Dim SCOMServer
Set SCOMServer = WScript.CreateObject("IBM.SystemsManagement.SCOMHelper.SCOMServer")

Dim licenseLevel, licenseToken
call SCOMServer.GetLicenseLevel(licenseToken, licenseLevel)


If SCOMServer.VersionCompare(licenseLevel,"4.0") &lt; 0 Then
WScript.Echo "This premium feature is only supported on servers with IBM Hardware management license 4.0 or higher. It is not supported on current server"
WScript.Echo "Refer to the IBM Hardware Management Pack User's Guide for more information on managed system requirements. "
WScript.Quit 1
End If

Call SCOMServer.AddSCOMEventLog(EventID, 4, IPAddress, null, null, null, null)

WScript.Echo "Module discovery was triggered."

'-----------------------------------------------------------------------------
' End of Main
'-----------------------------------------------------------------------------
</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="WA"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.CommandOutput</OutputType>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>