Forum Discussion
Okay. In that case, for that work you need to modify your script.
First confirm whether you can create a single pool and delete via curl. This is just my sanity check.
Next confirm you can create a single pool and delete via Python using those Libraries.
I would restructure the code to make it more simple/logical. I understand the for loop to create the different pool names. Maybe try using a list comprehension to create the pool name. And then iterate through the list.
Next. I believe the code is failing as the p.delete() is being executed within the loop where you are creating pool names.
Actually looks like you have two loops here. The for loop and when you do the with part... That is also a kind of loop.
I would create a function to create your pools and then a function to check the pools are in place and then create another function to delete the pools.
Does that make sense?