cancel
Showing results for 
Search instead for 
Did you mean: 

ASM Rest API Policy Merge - itemFilter not working

Steph
Nimbostratus
Nimbostratus

Dear All,

 

I am trying to merge ASM policies through rest API.

It works partially. I try to exclude Hostname & Redirection from being merged, but this seems to be ignored.

 

Here the settings I use:

 

eltPOSTMergeDiff    = "https://{}/mgmt/tm/asm/tasks/policy-merge".format(host)

eltPOSTMergeDiffArgs = \

   {

       "policyDiffReference": {"link": "https://{}/mgmt/tm/asm/policy-diffs/{}".format(host, DiffResultID)},

       "addMissingEntitiesToFirst": "true",

       "addMissingEntitiesToSecond": "false",

       "handleCommonEntities": "accept-from-second",

       "handleMissingEntitiesEnum": ["ignore", "accept-from-first", "accept-from-second"],

       "itemFilter": "entityKind ne 'tm:asm:policies:redirection-protection:redirection-protectionstate' or entityKind ne 'tm:asm:policies:host-names:host-namestate'"

   }

 

 

The (limited) documentation mentions that itemFilter should work as $filter.

https://cdn.f5.com/websites/devcentral.f5.com/downloads/icontrol-rest-api-user-guide-14-1-0.pdf

 

When, in a browser, I'm using the $filter with above content (of itemFilter) it works as expected

 

Any provided idea would be more than welcome

BR

S

0 REPLIES 0