Forum Discussion
andrew_deackes_
Nimbostratus
Oct 05, 2006syntax check?
Hi,
I'm a complete novice with i-rules, so can anybody advise how to test or check that the syntax is correct, that there are no problems with the writing of the rule (eg spurious characters or spaces) which might cause problems?
Thanks
Andy
4 Replies
- hoolio
Cirrostratus
Hello Andy,
You can enter the text of the rule you write in the GUI's rule page and it will verify the syntax before saving the rule.
Else, you can copy the /config/bigip.conf file to a temporary file, edit it to add your rule and then use 'b verify load /config/bigip_test.conf' to verify the syntax of the file.
When you're happy with the changes you can copy the temporary file over the existing bigip.conf file and run 'b load' to initialize the changes. Note that running 'b load' will reset all current connections through the BIG-IP so it should be used to test on a production unit.
Aaron - Nope...
-Joe - Martin_MachacekHistoric F5 AccountAaron,b verify load actually does not verify syntax of rules on BIG-IP 4.x. Try following simple experiment (to be executed in BIG-IP v4 CLI, a.k.a. bash shell ;-)):
cat < test_file rule invalid { this is not a valid rule } EOF b verify load test_file
See the output from b verify load test_file?
If you did b load test_file, you'd get syntax error (and all of your running configuration would have been nuked).
The sad truth is that there is no way how to verify validity of an iRule before attempting to load the configuration in v 4.x. - andrew_deackes_
Nimbostratus
Thanks for the advice guys. I've tried adding it via the GUI, this seems to pick up syntax errors so is probably the easiest way of checking for me.
Cheers
Andy
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
