Wally_Steadman_
Jun 25, 2012Nimbostratus
create IRule in tmsh
Greetings all,
I am trying to create an IRule from the command line in tmsh and running into errors that I am not sure how to correct.
I know there are other tools out there such as IControl that can be used but at this time we are doing configurations from the tmsh shell and I will investigate the other options later.
Using LTM Version 11.2 and trying to create the IRule I do the following from the tmsh prompt:
create ltm rule /Common/my_rule_rule { when HTTP_REQUEST { if { [class match [HTTP::uri] contains this_uri] } { pool my_test_pool_1 } else { pool my_test_pool_2 }}}
I get the following error:
Syntax Error: Unexpected {
I have tried removing some of the { but still having an issue.
I noticed that if I typed create ltm rule /Common/my_rule_rule that it takes me into an editor mode to apparently apply the rule. Is there a way to create the rule without having to go into the editor mode?