Forum Discussion
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
- Dave_McCauley_3
Cirrostratus
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
Nimbostratus
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
Cirrostratus
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
Nimbostratus
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.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com