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, and an array of array of string for the translation addresses. Regardless of what I provide for the translation address (string address or string ip address), my input is always being bounced with:
primary_error_code: 17236295
secondary_error_code: 0
error_string: 01070147:3: Snatpool /Common/****************(Obfuscated) must reference at least one translation address.
I've tried a number of variations to rule out possibilities of the input somehow being not in the right structure, as well as trying with a translation address already existing in f5. I've even created the translation address, called the translation address get_list method and stuck its output into an array and fed it into create.
I have also ruled out any issues with the addresses I am attempting to use, because I am successfully able to create the snatpool using the web ui.
All I'm left with is suspecting that the snatpool create_v2 method itself isn't working.
- verlocs_96134NimbostratusResolved.
- Todd_Cromwell_9NimbostratusHi Verlocs,
- Todd_Cromwell_9NimbostratusThat did not get posted quite faithfully. I will try again. The wsdl is
- Todd_Cromwell_9Nimbostratusoh well. If you go look at your wsdl on the bigip you will see that create_v2 has StringSeqSeq for t_a arg.
- Todd_Cromwell_9NimbostratusHere is a session using pyControl 1.x.
- Todd_Cromwell_9NimbostratusAs I said I do not use pyControl 2.x - I think 1.x is easier to use, because it doesn't ever require the typefactory thing (though it doesn't handle exceptions as well as 2.x). I haven't got a chance to test this yet (as a person I want to ask about it is not present), but apparently what is needed to do the nested arrays in 2.x is something like the following. Are you using the typefactory thing? If you aren't, perhaps that is your problem. Perhaps if you are trying to do it as I posted above for 1.x, your code may happen to work for StringSeqSeq because maybe that is a special case which I think might be allowed for strings where one can then avoid the typefactory thing (aided by: an IPAddress is really just a string as far as the wsdl goes). As I said, for pyControl 1.x, this is much easier because you can nest things with [[]] to your heart's content with no troubles.
- hooleylistCirrostratusHi Todd,
https://bigip11/iControl/iControlPortal.cgi?WSDL=LocalLB.SNATPool
- Todd_Cromwell_9NimbostratusYep, 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 } }
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