Version
4.0
if( names[i] == poolName ) {
nodes = allnodes[i];
found = true;
break;
}
}
if( ! found ) {
Console.WriteLine(
"Pool {0} does not exist..", poolName );
Environment.Exit( 1 );
}
found = false;
for( int i = 0 ; i < nodes.Length ; i++ ) {
if( nodes[i] == newNode ) {
found = true;
}
}
if( found ) {
Console.WriteLine(
"Pool {0} already contains {1}",
poolName, newNode );
Environment.Exit( 1 );
}
// Add one node to the pool
p.addNodes( new string[] { poolName },
new string[][] { new string[] { newNode } } );
} catch ( Exception e ) {
Console.WriteLine( "{0}", e );
}
}
}
Notes
This example uses careful error checking to make sure that the
Control API methods are not called incorrectly. For example, if a
37
New Page 1