Forum Discussion

Mitesh_378646's avatar
Mitesh_378646
Icon for Nimbostratus rankNimbostratus
Jan 10, 2019

iRule applied or not on virtual server.

I already have few iRules available on my virtualServer. Can someone please let me know what does it actually mean ?

 

Does it mean iRules already applied or do i need to applied explicitly ? if so how ?

 

I don't want to recreate iRule everytime. Just that i need to pick any one and apply.

 

Can someone please clarify on this ?

 

Thanks Mitesh

 

4 Replies

  • There's two boxes in the iRules screen on the virtual, the left is "Enabled" -- these are actually configured on the virtual server. The right side is "Available" -- these are what are on the device and can be moved over to "Enabled."

     

    You can reuse iRules on as many virtual servers as you want as long as they're written generically, such as an http to https redirect that uses the host header instead of hard coding the host into the redirect.

     

    • Mitesh_378646's avatar
      Mitesh_378646
      Icon for Nimbostratus rankNimbostratus

      Thanks Dave, How can i check this via Powershell API. as i am not admin so can't check those details by myself.

       

      Consider a scenario i have a generic iRule "http" to "https" redirect already available on virtual server apply this.

       

    • Dave_McCauley_3's avatar
      Dave_McCauley_3
      Icon for Cirrostratus rankCirrostratus

      You can use the API with powershell, I'm a unix guy so I don't have any experience with it, but I bet there's a script you could modify in the codeshare somewhere. You'll at least need a read-only user to view it though, and more access to modify the virtual server to apply the iRule.

       

      For the API call, there won't be anything under "rules" if it's not applied. To get a list of available rules, you'll just do a call to list all the iRules on the device, and then modify the virtual server and add the rule to it.

       

    • Mitesh_378646's avatar
      Mitesh_378646
      Icon for Nimbostratus rankNimbostratus

      Thanks Dave, I quickly called an API "Get-iRules.ps1" and it listed me too many iRules. Further more i tried calling another API "Invoke-AddIRuleToVirtualServer.ps1" it showed me warning "same iRule already available." So does that mean Irule is already applied ? And to remove i need to call "Invoke-RemoveiRuleToVirtualServer" which will remove it from server not from device. So i can add the same back to virtul server again.Is my understanding correct.

       

      Sorry for my silly question, as i completely new to this and not sure how this are interconnected.

       

      Thanks Again for your quick response.