Forum Discussion
vgeorge_113186
Feb 07, 2012Nimbostratus
creation of LocalLB::VirtualServer not reflecting in /config/*.conf files
I am creating a LocalLB::VirtualServer & it successfully created. I can see the newly created Virtual Server in the GUI. But I am unable to see the difference in /config/*.conf files.
Basically I want see what diff's are making the creation of a LocalLB virtualServer on configuration files. can somebody help me out. I am using Pycontrol & iControl APIs for doing the same. pasted the code below
!/bin/env python
import os
import time
import pycontrol.pycontrol as pycontrol
import util
Required SOAP namespace
WSDL = ['LocalLB.VirtualServer', 'LocalLB.VirtualAddressV2', 'System.ConfigSync', 'System.SystemInfo']
USER = 'admin'
PASS = 'infoblox'
HOST1 = '10.39.9.5'
b = pycontrol.BIGIP(hostname=HOST1, username=USER, password=PASS, fromurl=True, wsdls=WSDL, debug=False)
VERSION = b.System.SystemInfo.get_version()
v = b.LocalLB.VirtualServer
VIRTUAL_SVR_NAME = 'vs_11_11_11_11_53_gtm'
def Create_Virtual_Server():
b.LocalLB.VirtualServer.create(
vs_def = v.typefactory.create('Common.VirtualServerDefinition')
vs_def.name = VIRTUAL_SVR_NAME
vs_def.address = '11.11.11.11'
vs_def.port = 53
proto = v.typefactory.create('Common.ProtocolType')
vs_def.protocol = proto.PROTOCOL_UDP
vs_def_seq = v.typefactory.create('Common.VirtualServerSequence')
vs_def_seq.item = [vs_def]
context = v.typefactory.create('LocalLB.ProfileContextType')
prof = v.typefactory.create('LocalLB.VirtualServer.VirtualServerProfile')
prof.profile_context = context.PROFILE_CONTEXT_TYPE_ALL
prof.profile_name = 'udp_gtm_dns'
prof_dns= v.typefactory.create('LocalLB.VirtualServer.VirtualServerProfile')
prof_dns.profile_name = 'dns'
prof_seq = v.typefactory.create('LocalLB.VirtualServer.VirtualServerProfileSequence')
prof_seq.item = [prof, prof_dns ]
v.create(
definitions = vs_def_seq,
wildmasks=['255.255.255.255'],
resources=[[]],
profiles=[prof_seq] )
def main():
Create_Virtual_Server()
main()
- iControl, by default, doesn't flush the configuration to disk (ie, /config/bigip.conf, bigip_base.conf). The reason is as simple in that it takes too long. If you have a large configuration, saving to disk can take seconds and when you are trying to make numerous API method calls, a couple seconds between calls can be very painful.
- mhite_60883CirrocumulusSo, uh, does it eventually flush it to disk, even if you don't do System.ConfigSync.save_configuration()? [That would seem to be our observation...] Slightly confused by your answer...
- snovakov_86258NimbostratusHi mhite!
- Posted By mhite on 02/07/2012 09:24 AM
- Posted By snovakov on 02/07/2012 09:39 AM
- snovakov_86258NimbostratusSorry, Joe.
- snovakov_86258Nimbostratus
Joe,
Doesn't the SAVE_FULL do a 'bigpipe config save all'?
- Yes, but there's a separate entry path if you call the save_encrypted_configuration() method where it append passphrase info.
- vgeorge_113186NimbostratusSystem.ConfigSync.save_configuration() works for me. thanks Joe
- vgeorge_113186NimbostratusI observed that System.ConfigSync.save_configuration() is works with v11 devices but it doesn't flush in the case of v10 devices. any info?
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