Forum Discussion
E_Lenny_Brown_1
Nimbostratus
Oct 11, 2004Can I get a code example
Can I get a code example showing:
ITCMGlobalLB.Wideip.add_pool_virtual_server
in perl (SDK 4.6.2)?
Thanks
Lenny Brown
- Here you go. I've hard coded in the values. For this method to work you need to make sure the following:
sub addWideipPoolVS() { Build up parameters my $wideip_name = "mywip.foo.com"; my $pool_name = "web_servers"; my $vs_source = { addr => "123.123.123.1", port => "80" }; my $vs_trans = { addr => "10.10.10.1", port => "80" }; my $vs_depends = { addr => "192.168.11.149", port => "80" }; my $vs_ratio = 0; my $vs_status = 0; ENABLE my $vs_state = 0; STAT_BLUE my $vsAttr = { source => $vs_source, translated => $vs_trans, depends => [$vs_depends], ratio => $vs_ratio, status => $vs_status, state => $vs_state }; $soapResponse = $Wideip->add_pool_virtual_server ( SOAP::Data->name(wideip_name => $wideip_name), SOAP::Data->name(pool_name => $pool_name), SOAP::Data->name(vs => $vsAttr) ); if ( $soapResponse->fault ) { print $soapResponse->faultcode, " ", $soapResponse->faultstring, "\n"; } else { print "Pool Virtual Server added successfully.\n"; } }
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