Forum Discussion
dani_martinez_2
May 13, 2018Nimbostratus
Assign an Existing Node to Pool in F5 BIG IP through F5-SDK
Is there any way to assign a node that already exists in the Common partition to a pool that also already exists? For example:
Call pool and node
pool = bigip.tm.ltm.pools.pool.load(name="mypool", partition='Common')
node = bigip.tm.ltm.nodes.node.load(name="mynode", partition='Common')
First Option pool.members_s.members.create(name=node.name, partition="Common")
pool.update()
Second Option pool.members_s.members[0] = node
I don't know if the code is exactly correct, thanks in advance
- Jason_NanceNimbostratus
You almost had it!
pool = mgmt.tm.ltm.pools.pool.load(partition='Common', name='mypool') pool.members_s.members.create(partition='Common', name='mynodename:80')
The secret sauce is in the overloaded
argument - it is really "node_name:service_port".name
The above adds an existing node called "mynodename" to the pool and sets its service port to 80.
- dani_martinez_2Nimbostratus
OK! That's right I forgot the port, Thanks!!
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