Forum Discussion
How do you build an iApp policy in LTM v12.1?
In LTM 11.5.3, my custom iApp creates a layer7 content switching policy with the following code: iapp::conf create ltm policy $l7policy controls replace-all-with { forwarding } requires replace-all-with { http } rules replace-all-with { $suburi } strategy first-match
I upgraded to LTM 12.1, which changes the way policies work: From release notes: "Using policies involves three basic steps: creating a draft policy, publishing the policy, and associating the published policy with a virtual server".
So now my code above drives this error: "01071abb:3: Cannot create/modify published policy '/Common/jeff-test.app/jeff-test_l7policy' directly, try specifying a draft folder like '/Common/jeff-test.app/Drafts/jeff-test_l7policy'"
I can get the "tmsh create ltm policy /Drafts/jeff-test_l7policy" and "tmsh publish ltm policy Drafts/jeff-test_l7policy" to work from the CLI without a problem.
So I tried this in my template: iapp::conf create ltm policy Drafts/$l7policy controls replace-all-with { forwarding } requires replace-all-with { http } rules replace-all-with { $suburi } strategy first-match iapp::conf publish ltm policy Drafts/$l7policy
And I get an error indicating it doesn't like the new "publish" parameter. script did not successfully complete: (iapp::conf illegal parameter . invoked from within "iapp::conf publish ltm policy Drafts/$l7policy"
Anyone know how to get around this? It seems to me like there may not be iApp support for the 12.1 "publish" parameter. Thanks, Jeff
Add the keyword "legacy" to your tmsh create ltm policy statement.
4 Replies
- Fred_Slater_856Historic F5 Account
Add the keyword "legacy" to your tmsh create ltm policy statement.
- jbuddenh_127560
Nimbostratus
Bingo! You're the best Fred. Thanks! - shadowman13_217
Nimbostratus
Hello,
Is there any other way to publish policy with iApps? The legacy mode seems not stable.
- Fred_Slater_856Historic F5 Account
Shadowman13- I have responded in your other thread.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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