For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

jbuddenh_127560's avatar
jbuddenh_127560
Icon for Nimbostratus rankNimbostratus
Jun 08, 2016
Solved

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

 

4 Replies