use BigIP::iControl;
use Data::Dumper;
my $ic = BigIP::iControl->new(
server => '1.3.10.160',
username => 'ff',
password => '123456',
port => 443,
proto => 'https'
);
##获取所有定义的LTM 虚拟机服务器
my @ltm_virtuals = $ic->get_ltm_vs_list();
foreach $vs (@ltm_virtuals){
print $vs;
print "
";
## 获取指定的LTM 虚拟机服务器的目的地,格式为ip:port
my $destination = $ic->get_vs_destination($vs);
my $default_pool_name = $ic->get_default_pool_name ($vs);
print $vs.'->'.$default_pool_name.'->'.$destination."
";
##获取指定的LTM 虚拟机服务器,指定的LTM pool 的member
foreach my $member ($ic->get_ltm_pool_members($default_pool_name)) {
print " $member
";
};
};