Data ONTAP PRO: ImplementTip.CreateEvent.WriteActionModuleType

DataONTAP.PRO.ImplementTip.CreateEvent.WriteActionModuleType (WriteActionModuleType)

This write action module logs an event on the management server when the SCVMM user chooses to implement a PRO Tip.

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityInternal
RunAsDataONTAP.SecureReference.RunAsProfileVirtualization
InputTypeSystem.BaseData

Member Modules:

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

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
EventParametersstring$Config/EventParameters$EventParametersEventParameters
EventIDint$Config/EventID$EventIDEventID
TimeoutSecondsint$Config/TimeoutSeconds$TimeoutSecondsTimeoutSeconds

Source Code:

<WriteActionModuleType ID="DataONTAP.PRO.ImplementTip.CreateEvent.WriteActionModuleType" Accessibility="Internal" Batching="false" RunAs="DS!DataONTAP.SecureReference.RunAsProfileVirtualization">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="EventParameters" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="EventID" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="TimeoutSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="0" name="Name" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="0" name="VMMServer" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="0" name="PROTipID" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="0" name="EventSource" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="0" name="ScriptParameters" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="EventParameters" Selector="$Config/EventParameters$" ParameterType="string"/>
<OverrideableParameter ID="EventID" Selector="$Config/EventID$" ParameterType="int"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="WA" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>CreateEventLogEntry.vbs</ScriptName>
<Arguments>$Config/Name$ $Config/VMMServer$ $Config/PROTipID$ $Config/EventID$ $Config/EventSource$ $Config/ScriptParameters$</Arguments>
<ScriptBody><Script>
' Main
' Create the log entry and then execute eventcreate
' Use the command line parameter as the description of the event
'
SetLocale("en-us")

dim argsCount
set args = WScript.Arguments

argsCount = args.Count
if argsCount = 0 then
WScript.quit 1
end if

LogDesc = args.Item(0)
for k = 1 to argsCount -1
LogDesc = LogDesc &amp; "|" &amp; args.Item(k)
next

EventID = args.Item(argsCount-3)
LogName = "OnCommand"
LogSource = "Data ONTAP PRO MP"

Set WshShell = WScript.CreateObject("WScript.Shell")
strCommand = "eventcreate /T Information /ID " &amp; EventID &amp; " /L " &amp; LogName &amp; " /SO " &amp; LogSource &amp; " /D " &amp; Chr(34) &amp; LogDesc &amp; Chr(34)
WshShell.Run strcommand , 0
</Script></ScriptBody>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="WA"/>
</Composition>
</Composite>
</ModuleImplementation>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>