Forum Discussion
tmsh to bigsuds - virtual server - associate a vlan and assign a persistence profile
Managed to succeed in these areas soon after posting ... Sharing anyway, this might help someone down the road...
- persistence : the string was missing the Partition prefix '/Common' ...
b.LocalLB.VirtualServer.add_persistence_profile( virtual_servers = [virtualname], profiles = [[ {'profile_name': '/Common/source_addr', 'default_profile': 'true'} ]] )
- set_vlans: had to fix / expand the vlans definition after a closer look at the API docs
from
obj.LocalLB.VirtualServer.set_vlan( virtual_servers = [virtualname], vlans = [vlans] )
to
obj.LocalLB.VirtualServer.set_vlan( virtual_servers = [virtualname], vlans = [{ 'state':'STATE_ENABLED', 'vlans':[vlans_list] }] )
Note: vlans_list is picked up via the 'vlans' arg, a list of comma-separated vlans specified on the command line: I have set 2 vlans at once on this VS... Here is an excerpt of my create_vip function:
vlans_list = []
for vm in vlans.split(','):
vlans_list.append(vm)
Almost there...
What's left is to research around the snat pool creation
v11: set_source_address_translation_snat_pool ? anything else?
hopefully it's also v10 compat so I won't have to juggle between that and set_snat_pool (v9)...
If you have examples to share, this is what I have to move from:
tmsh create /ltm snat MY_SNAT_POOL translation 1.2.3.4 origins add { 5.6.7.8/32 } vlans-enabled vlans add { Internal }
tmsh modify /ltm snat-translation 1.2.3.4 { tcp-idle-timeout 300 udp-idle-timeout 300 ip-idle-timeout 300 }
Thks
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