Forum Discussion

Michel_van_der_'s avatar
Michel_van_der_
Icon for Nimbostratus rankNimbostratus
May 28, 2004

Can I get the target of a proxy?

If I have created a proxy with ITCMLocalLB.Proxy.create, how can

 

I later on find which was the actual target defined?

2 Replies

  • bknotwell_12713's avatar
    bknotwell_12713
    Historic F5 Account
     
     !/usr/bin/env python 
     from SOAPpy import SOAPProxy,structType 
      
     ns = 'urn:iControl:ITCMLocalLB/Proxy' 
     url = 'http://blah:blahblah@192.168.1.14/iControl/iControlPortal.cgi' 
      
     s = SOAPProxy(url,namespace=ns) 
     proxyList = [ structType(data={'address' : '192.168.1.121','port' : 443 })] 
      
     print s.get_proxy_target(proxies = proxyList) 
     print s.get_proxy_target_type(proxies = proxyList) 
     

    =================== gives you =====================

    : [: {'port': 80L, 'address': '192.168.1.121'}]

    : [0] (0 == VIP and 1 == SERVER)

    Hope this helps.
  • Thanks Brad!

    As Brad mentioned there are a few new methods added as of 4.5-PTF08. Here are the function prototypes:

    IPPortDefinition[] get_proxy_target( 
         in IPPortDefinition[] proxies 
     ); 
      
     enum ProxyTarget 
     { 
         PROXY_TARGET_VIP = 0, 
         PROXY_TARGET_SERVER = 1 
     }; 
      
     ProxyTarget[] get_proxy_target_type( 
         in IPPortDefinition[] proxies 
     );

    You can verify that they exist by viewing the WSDL on your device

    http://bigip_address/iControl/iControlPortal.cgi?WSDL=ITCMLocalLB.Proxy.wsdl

    As a side note, I just kicked off the first build of the 4.6.2 release of the SDK which is scheduled to be released with BIG-IP v4.6.2. It will document and support all features added since 4.5. The release date is currently set for 7/29/04.

    -Joe