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()