Forum Discussion
verlocs_96134
Nimbostratus
Apr 03, 2012SNATPool create_v2 Translation Address argument
What I'm using: pycontrol on python 2.6
What I'm talking to: bigip v11
When I attempt to call the create_v2 command for SNATPool, I am providing an array of string for the snatpool name...
Todd_Cromwell_9
Nimbostratus
Apr 05, 2012Yep, that worked, in pycontrol 2.x, as follows:
>>> tas = ictl.LocalLB.SNATPool.typefactory.create("Common.IPAddressSequenceSequence")
>>> arr1 = ictl.LocalLB.SNATPool.typefactory.create("Common.IPAddressSequence")
>>> arr1.item = ["10.1.1.8"]
>>> tas.item=[arr1]
>>> ictl.LocalLB.SNATPool.create_v2(["sp8"],tas)
[root@localhost:Active] iControl tmsh list ltm snatpool sp8
ltm snatpool sp8 {
members {
10.1.1.8
}
}
So with the proper coding in pyControl 2.x, the IPAddress type works as expected. As I said I do not like the type factory thing; pyControl 1.x did not require it.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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