Forum Discussion
verlocs_96134
Apr 03, 2012Nimbostratus
SNATPool 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
Apr 04, 2012Nimbostratus
Here is a session using pyControl 1.x.
tmsh, create the trans addr:
root@(localhost)(cfg-sync Standalone)(Active)(/Common)(tmos) create ltm snat-translation t4 address 10.1.1.4
pycontrol 1.x, create the snat pool:
>>> ls.LocalLB_SNATPool.create_v2(snat_pools=['sp4'], translation_addresses=[['t4']])
{}
tmsh, show what got created:
[root@localhost:Active] iControl tmsh list ltm snatpool sp4
ltm snatpool sp4 {
members {
t4
}
}
logging during the iControl op:
Apr 3 17:36:49 localhost debug iControlPortal.cgi[21524]: LocalLB:SNATPool::create_v2 called by user "admin"
Apr 3 17:36:49 localhost debug iControlPortal.cgi[21524]: LocalLB: [0] Name: sp4
Apr 3 17:36:49 localhost debug iControlPortal.cgi[21524]: LocalLB: [0] SNAT Pool: sp4
Apr 3 17:36:49 localhost debug iControlPortal.cgi[21524]: LocalLB: [0] Translation Address: t4
Apr 3 17:36:49 localhost debug iControlPortal.cgi[21524]: LocalLB:+++++++++++++++new+++++++++++++++++++
Notice with pycontrol 1.x you don't need a TypeFactory thing to make the arguments. Either way I pass a string, whether the argument is String or IPAddress. I do not know pyControl 2.x very well, but if you post what you are doing in pyControl 2.x, I can try to help. Do you use a TypeFactory?
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