Forum Discussion
Changing a LTM policy using iApp (or tmsh) in version 12.1
We are installing V12.1 on our F5 but have the folowwing problem. How can we change LTM policies (add rule to a policy) using a sel-written iApp.
We are running VCMP with multiple guests which have multiple partitions.
The way for treating policies has changed. A policy mus be in Draft status to be changed, and after having changed it must be published.
The problem we have is that we can't create a copy in draft from the published library using tmsh commands (using the guy it works, but we need our iApp to create VSes following our standard).
We want to modify the policy tst-infrabel-.NE in partition Infrabel
create ltm policy /Infrabel/Drafts/tst-infrabel-.NET create-draft gives error: 01070734:3: Configuration error: Can't associate Policy (/Infrabel/Drafts/Drafts/tst-infrabel-.NET) folder does not exist
create ltm policy /Infrabel/tst-infrabel-.NET create-draft gives error: 01020066:3: The requested Policy (/Infrabel/tst-infrabel-.NET) already exists in partition Infrabel.
create ltm policy tst-infrabel-.NET create-draft gives error:01020066:3: The requested Policy (/Infrabel/tst-infrabel-.NET) already exists in partition Infrabel.
What do I miss here?
Hi Jan, if you use the "legacy" parameter in your tmsh command, it will use the pre-12.1 syntax. You shouldn't need to specify a drafts folder.
thanks
Mike
- mikeshimkus_111Historic F5 Account
Hi Jan, if you use the "legacy" parameter in your tmsh command, it will use the pre-12.1 syntax. You shouldn't need to specify a drafts folder.
thanks
Mike
- jan_de_wachter_Nimbostratus
Mike, Thanks. I added the legacy keyword, and indeed it works!
if {$Version_v12 == "1"} { set vpol "ltm policy /Infrabel/$::new__env$vpol1 { legacy rules add { $vapp { actions add { $vrule } conditions add { 0 { http-host values { $vapp } } } ordinal 1 } } }" }
tmsh::create $vpol
Thanks a lot, it works fine, but it stays a work-around.
In my opinion, the 12.1 way should be working also:
-create draft from published policy
-modify draft
-publish draft
Jan
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