Using HP Insight Software from a Highly Available Central Management Server with Microsoft Cluster Service

30
Next
Next
WSCript.Echo ""
WScript.Echo _
"Checking if VSE cluster resources are able to be defined..."
'This On Error will allow execution if grpName does not exist.
On Error Resume Next
Set cluGroup = objCluster.ResourceGroups.Item(grpName)
If cluGroup Is Nothing Then
WScript.Echo "OK! - Cluster Group '" & grpName & "'"
Else
WarnMsg "Cluster Group '" & grpName & "' already exists."
End If
'Reset Error handling
On Error Goto 0
Set hRes = CreateObject("Scripting.Dictionary")
hRes.Add "hasimDisk", simDisk
hRes.Add "hasimNetname", simNetname
hRes.Add "hasimIP", simIP
' create an inverted hash to more easily compare against
' the set of keys, in this case, the resource names
' assigned above
Set hResInv = CreateObject("Scripting.Dictionary")
invertHash hRes, hResInv
getClusterResources
ErrorCheck "getClusterResources", "Error encountered: "_
& Err.Description
'loop thru resource strings, to verify that it matches the
'hash configured above. If we find a match of a resource,
'that may prevent it from being created by the next job step.
For Each resKey In hRes.Keys
If checkResource (hres(resKey)) = True Then
WarnMSg "Cluster resource '" &_
hres(resKey) & "' already exists."
Else
Wscript.Echo "OK! - Cluster resource '" &_
hres(resKey) & "'"
End If
ErrorCheck "checkResource", "Error encountered: " &_
Err.Description & hres(resKey)
Next
If iWarn > 0 Then
WScript.Echo ""
WScript.Echo "There have been " & iWarn & " warnings."
WScript.Echo "Some prerequisite conditions have not"_
& "been met."
WScript.Echo "Continuing with VSE cluster resource"_
& "definition is not recommended."
Else
WScript.Echo ""
WScript.Echo "Prerequisite conditions appear to have"_
& "been met."
WScript.Echo "Continue with VSE cluster resource"_
& "definition."
End If
cluDisconnect
]]>
</script>
</job>
<!--============================================================
=============================================================-->
<job id="define">
<!--=========================================================
; The following line references the MSCLUS type library, which