Forum Discussion
Amador_130070
Nimbostratus
Jul 29, 2014Use iControl API to query for node list for IP verification and hostname resolve.
I would like to write a script using python that will pull a node list from F5 of node names ONLY included in all partitions. The output could be a text file with the list or my script will parse th...
mimlo_61970
Cumulonimbus
Jul 31, 2014See 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)
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