def list_pool(hostname, username, password, name=None):
 bigip_session = _build_session(username, password)
 try:
  if name:
   response = bigip_session.get((BIG_IP_URL_BASE.format(host=hostname) + '/ltm/pool/{name}/?expandSubcollections=true'.format(name=name)))
  else:
   response = bigip_session.get((BIG_IP_URL_BASE.format(host=hostname) + '/ltm/pool'))
 except requests.exceptions.ConnectionError as e:
  return _load_connection_error(hostname, e)
 return _load_response(response)

def list_pool ( hostname , username , password , name = None ) : bigip_session = _build_session ( username , password ) try : if name : response = bigip_session . get ( ( BIG_IP_URL_BASE . format ( host = hostname ) + '/ltm/pool/{name}/?expandSubcollections=true' . format ( name = name ) ) ) else : response = bigip_session . get ( ( BIG_IP_URL_BASE . format ( host = hostname ) + '/ltm/pool' ) ) except requests . exceptions . ConnectionError as e : return _load_connection_error ( hostname , e ) return _load_response ( response )
a function to connect to a bigip device and list a specific pool .