Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

LTM Tfaffic Policies via iControlRest

Prior to v12.1.0 I had an automation script which we run in batches of dozens to hundreds of VIP, Pool, Profile, Policy, etc creations. The script utilizes the Rest interface to create Policies and after Vip creation, it applies the policies. Much to my surprise after our network team upgraded some of our F5s to v12.1.0 last week, the Policy creation broke. I explored this in the GUI and see the problem. There is now a "draft" phase introduced before published policies. I managed to tinker with my powershell and successfully create a new "draft" policy. However, I cannot successfully get the draft policy published via the Rest interface. Does anyone know how this can be accomplished programmatically? Using the GUI is not a viable option when I am building out hundreds of Policies at a time.

0
Rate this Question
Comments on this Question
Comment made 29-Jul-2016 by Tony D. Dodd 1

We were able to find a solution to this. The answer is to make a post request to the policy root with the following JSON body: {command: "publish", name: "/Common/Drafts/targetpolicy"} Request URL: https://yourf5.com/mgmt/tm/ltm/policy Request Method: POST

2

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Test bullet and order

0
Comments on this Answer
Comment made 30-Jul-2016 by Tony D. Dodd 1

huh?

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Thanks for answering your own question Tony! That saved us a lot of searching.

@F5 and community Could we get a supported/official answer on this? I noticed this still works in 12.1 but it doesn't really feel 'RESTy' to post a command like this so I'm worried that this might get deprecated in the future. The API docs do not document the publishing of ltm policiese at all as far as I can tell.

Thanks a bunch,

a happy iControl REST user,

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi, someone from F5, please take a look on this. I have exactly same thoughts that this "strange" way of creating draft policy via API Rest might be deprecated in future. What's the plan??

0