Forum Discussion
mimlo_61970
Jul 31, 2014Cumulonimbus
See below. You'll need to download bigsuds and install it. I don't have nodes in multiple partitions so I cannot confirm that part, but it should work. the script will leave you with a python list(all_nodes) that contains the IP address of all the nodes on the device(in the given partition list)
import bigsuds
hostname = "hostname"
username="username"
Password="password"
b = bigsuds.BIGIP(
hostname = hostname,
username = username,
password = password,
)
b2 = b.with_session_id()
folders = ['/Common', '/SecondPartition']
all_nodes = []
for f in folders:
b2.System.Session.set_active_folder(f)
node_list = b2.LocalLB.NodeAddressV2.get_list()
node_address = b2.LocalLB.NodeAddressV2.get_address(node_list)
all_nodes.extend(node_address)