Forum Discussion

stecino_87658's avatar
stecino_87658
Icon for Nimbostratus rankNimbostratus
Jan 21, 2016

Adding Compression and Web Acceleration profiles to Virtual Server via Icontrol API

Hello,

 

I have already created via Icontrol API, the compression and web acceleration profiles, but I couldn't find any methods to assign them to VIP.

 

Another question I had, why in 11.x these HTTP profile settings were moved as separate profile entities?

 

Thanks

 

4 Replies

  • Since all profile names must be unique (even across types), you only need to add them as a profile to the virtual server. See LocalLB::VirtualServer::add_profile.

    Python Bigsuds Example
    b.LocalLB.VirtualServer.add_profile(
        ['/Common/my_virtual_server'],
        [{
            'profile_context': 0,
            'profile_name': '/Common/my_compression_profile'
        }]
    )
    
  • Thanks for the quick reply. How will API know if this is a compression profile and not http for example. Don't I need to explicitly specify?

     

    • Theo_12742's avatar
      Theo_12742
      Icon for Cirrus rankCirrus
      Nope. Profile names must be unique across ALL profile types. Thus the profile you are applying would be unique, and the platform determines the type once it is called. You can see this in the configuration file or by using `tmsh list ltm virtual`. You will see a bunch of profiles applied, but not specifying what type. The API merely mimics TMSH.