Forum Discussion
Richard__Harlan
Oct 26, 2004Historic F5 Account
get_node_server_list
This is my first iControl script and I am havein a little problem. I can not for the life of me get any output from the script. But if I run the script in SOAP Debug mode it look like the system is getting the output. Below is my script any help would be great. Thanks
!/usr/bin/perl
Returns a list of all nodes on the BigIP
-------------------------------------------------------------------
SOAP
use SOAP::Lite + trace => qw(method debug);
use SOAP::Lite;
-------------------------------------------------------------------
$hostname = $ARGV[0];
$userid = $ARGV[1];
$password = $ARGV[2];
chomp ($hostname);
chomp ($userid);
chomp ($password);
------------------------------------------------------------------
Connect to BigIP
------------------------------------------------------------------
sub SOAP::Transport::HTTP::Client::get_basic_credentials
{
return "$userid" => "$password";
}
$mont2 = SOAP::Lite
-> uri('urn:iControl:ITCMLocalLB/Node')
-> proxy("https://$hostname/iControl/iControlPortal.cgi");
$mont2_response = $mont2->get_node_server_list;
$output = $mont2_response->result;2 Replies
- Loc_Pham_101863Historic F5 AccountHi,
Give this a try:------------------------------------------------------------------------ Query Node List ------------------------------------------------------------------------ $soap_response = $soap->get_node_server_list(); if ( $soap_response->fault ) { print $soap_response->faultcode, "(faultstring) ", $soap_response->faultstring, "\n"; print $soap_response->faultcode, "(faultdetail) ", $soap_response->faultdetail, "\n"; } else { print "Available Nodes:\n"; my $nodeNumber = 0; my @node_def_list = @{$soap_response->result}; foreach my $node_def (@node_def_list) { print "\t[$nodeNumber] = '", $node_def->{"address"}, ":", $node_def->{"port"}, "'\n"; $nodeNumber++; } } - Loc_Pham_101863Historic F5 AccountYou're welcome. Please let us know your progress or any further question you may have.
Regards.
Loc
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
