Forum Discussion

Ken_Wong_48678's avatar
Ken_Wong_48678
Historic F5 Account
Jul 16, 2008

remove irule

Hi,

 

 

My customer would like to remove irule using icontrol. Is there any sample script here? TIA.

 

 

Regards,

 

Ken

4 Replies

  • Don_MacVittie_1's avatar
    Don_MacVittie_1
    Historic F5 Account
    Hi Ken,

     

     

    I don't think there is a sample that does this out there, but it is very simple. Take any of the existing samples (I don't know what language and library your customer uses, so I won't include one here) and use the part that starts communications, then they just need to call LocalLB.Rule.delete_rule() with an array of rule names.

     

     

    This routine is a bit dangerous, but remind them that if they get into trouble, it doesn't change the start-up configuration until they save their changes. That means that unless they're automatically saving in their code, they can recover from an unintended delete, but if they want their changes to persist beyond the next reboot they will have to save changes.

     

     

    Regards,

     

    Don.
  • Keep in mind that you cannot delete a iRule if it is use by a virtual server. You'll need to use the LocalLB.VirtualServer.remove_rule() method first before actually deleting the iRule from the system with the LocalLB.Rule.delete_rule() method.

     

     

    -Joe
  • a) Looking for a program (perl) that can remove the member from an existing pool?

     

    b) How can I register a new Pool and register an iRule with it?