Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.9 KiB

  1. <HTML>
  2. <HEAD>
  3. <style>
  4. <!-- body { font-family: Verdana, Arial; font-size: 75%; }
  5. p.cluster { margin-top: 1em; margin-bottom: 0em; margin-left: 0em; }
  6. p.resource { margin-top: 1em; margin-bottom: 0em; margin-left: 5em; }
  7. p.depend { margin-top: 0em; margin-bottom: 0em; margin-left: 10em; } -->
  8. </style>
  9. <TITLE> Possible Owners</TITLE>
  10. <SCRIPT LANGUAGE="VBSCRIPT">
  11. <!--
  12. Option Explicit
  13. On Error Resume Next
  14. Dim oCluster
  15. Dim sCluster
  16. Dim oRes
  17. Dim oDependency
  18. Dim oDependent
  19. Dim oDummy, oDummy1
  20. Set oCluster = CreateObject("MSCluster.Cluster")
  21. sCluster = InputBox( "Cluster to open?", "galenb-clus" )
  22. oCluster.Open( sCluster )
  23. Document.Write "<B><p class=cluster>Cluster name is " & oCluster.Name & "</B><BR>"
  24. for each oRes in oCluster.Resources
  25. Document.Write "<B><p class=resource>Resource name is " & oRes.Name & "</B><BR>"
  26. for each oDependency in oRes.Dependencies
  27. Document.Write "<p class=depend>Dependency resource name is " & oDependency.Name & "<BR>"
  28. next
  29. for each oDependent in oRes.Dependents
  30. Document.Write "<p class=depend>Dependent resource name is " & oDependent.Name & "<BR>"
  31. next
  32. next
  33. set oDummy = oCluster.Resources.Item( "Dummy" )
  34. set oDummy1 = oCluster.Resources.Item( "Dummy1" )
  35. oDummy.Offline 10
  36. oDummy1.Offline 10
  37. 'oDummy.Dependencies.AddItem( oDummy1 )
  38. oDummy1.Dependents.AddItem( oDummy )
  39. Document.Write "<B><p class=resource>Resource name is " & oDummy.Name & "</B><BR>"
  40. for each oDependent in oDummy.Dependents
  41. Document.Write "<p class=depend>Dependent resource name is " & oDependent.Name & "<BR>"
  42. next
  43. oDummy.Dependencies.RemoveItem( 1 )
  44. for each oDependent in oDummy.Dependents
  45. Document.Write "<p class=depend>Dependent resource name is " & oDependent.Name & "<BR>"
  46. next
  47. oDummy.Online 10
  48. oDummy1.Online 10
  49. -->
  50. </SCRIPT>
  51. </HEAD>
  52. <BODY>
  53. </BODY>
  54. </HTML>