Forum Discussion
f5 sdk can't load pool objects after create pool.
Here's a rough of what I meant... Not finished and no error checking, but I will leave the excitement of figuring out to you :-)... Devcentral does not handle me pasting code in so well here (had to manually put indentation back in. But there you go...
from f5.bigip import ManagementRoot
from f5.bigip.contexts import TransactionContextManager
mgmt = ManagementRoot('10.5.10.23', 'admin', 'XXXXX', token=True)
tx = mgmt.tm.transactions.transaction
pool_names = ['pool' + str(x) for x in range(1, 50) ]
def pool_create():
for name in pool_names:
with TransactionContextManager(tx) as api:
api.tm.ltm.pools.pool.create(name=name, partition='Common')
api.tm.util.bash.exec_cmd(
command='run',
utilCmdArgs="-c 'tmsh save sys config'"
)
def pool_list():
def pool_remove():
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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