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.
47 lines
1.1 KiB
47 lines
1.1 KiB
<job id="Cluster NetInterfaces">
|
|
|
|
<reference guid="{f2e606e0-2631-11d1-89f1-00a0c90d061e}" version="1.0" />
|
|
|
|
<script language="JScript">
|
|
|
|
RunNetInterfacesTests();
|
|
WScript.Echo( "Result:" + ForInTest());
|
|
|
|
function RunNetInterfacesTests()
|
|
{
|
|
|
|
var count;
|
|
var oNetInterface;
|
|
var oNetInterfaces;
|
|
var oCluster;
|
|
|
|
oCluster = WScript.CreateObject("MSCluster.Cluster");
|
|
oCluster.Open( ("GALENB-CLUS"));
|
|
collNetInterfaces = oCluster.NetInterfaces;
|
|
count = collNetInterfaces.count;
|
|
WScript.Echo( "Count: " + count );
|
|
for ( oNetInterface in collNetInterfaces ) { //loop every item in collection
|
|
WScript.Echo( "NetInterface: " + oNetInterface.Name );
|
|
} //for every item in collection
|
|
|
|
}
|
|
|
|
function ForInTest()
|
|
{
|
|
// Create some variables.
|
|
var a, key, s = "";
|
|
// Initialize object.
|
|
a = {"a" : "Athens" , "b" : "Belgrade", "c" : "Cairo"}
|
|
// Iterate the properties.
|
|
for (key in a)
|
|
{
|
|
s += a[key] + "<BR>";
|
|
WScript.Echo( "String: " + s );
|
|
}
|
|
|
|
return(s);
|
|
}
|
|
|
|
</script>
|
|
|
|
</job>
|