1. 程式人生 > >python 獲取指定pool的成員資訊

python 獲取指定pool的成員資訊

2. 獲取pool的成員:

pool 方法:

get_ltm_pool_members

sub __get_pool_members {
        my ($self, $pool, $module)= @_;
        return $self->_request(module => $module, interface => 'Pool', method => 'get_member', data => {pool_names => [$pool]});
}
import sys
import pycontrol.pycontrol as pc
import time
import csv
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
pool='YXPT_ust_pool'

b = pc.BIGIP(
hostname = '10.4.170.160',
username = 'zjtlcb',
password = '123456',
fromurl = True,
    wsdls=['LocalLB.Pool'])
pools = b.LocalLB.Pool
print pools
print dir(pools)

print dir(pools)
a= pools.get_member(pool_names=['YXPT_ust_pool'])
# print type(a)

print a