Ruby Big IP Profile Switcher Class
Problem this snippet solves:
The BIGIPProfileSwitcher class will connect to two BIG-IPs and allow for profiles and HTTP Class profiles for be added and removed from a virtual server. In our testing, we use this class to turn Web Accelerator on and off on our virtual servers, but there are many possible uses.
Important: This class must be called from within a Ruby program.
How to use this snippet:
Configuration
Edit the bigip-config.ylm and bigip2-config.ylm files to include the addresses and credentials for the two BIG-IPs.
insertProfile
Use for regular profiles. This method takes a number (1 or 2) to specify which BIG-IP to use followed by the name of the profile to use. It is necessary to use the setTargetVS method to set the virtual server that the other methods will effect before using any other method.
removeProfile
Use for regular profiles. This method takes a number (1 or 2) to specify which BIG-IP to use followed by the name of the profile to use. It is necessary to use the setTargetVS method to set the virtual server that the other methods will effect before using any other method.
insertHTTPClassProfile
Use for HTTPClass profiles. This method takes a number (1 or 2) to specify which BIG-IP to use followed by the name of the profile to use. It is necessary to use the setTargetVS method to set the virtual server that the other methods will effect before using any other method.
removeHTTPClassProfile
Use for HTTPClass profiles. This method takes a number (1 or 2) to specify which BIG-IP to use followed by the name of the profile to use. It is necessary to use the setTargetVS method to set the virtual server that the other methods will effect before using any other method.
Code :
# file attachment 404