Create new ASM Policy from Exported XML
I'm trying for a couple weeks now to Export an ASM Policy from that is assigned to VirtualServer A and import that ASM Policy to VirtualServer B. My goal is to always be able to sync the policies when needed and at the same time keep them different.
My original plan was: 1 - Export the Policy from Virtual Server A as XML file. 2 - Import the XML File Policy on Virtual Server B.
I'm able to export without any problem using the Rest Service my policies but I can't import at all. I wonder if I'm doing anything wrong or that resource is just not available on 12.1.0
I already tried to do a POST on https://%/mgmt/tm/asm/tasks/import-policy with the current format:
{ "filename": "mypolicy.xml", "name": "NewPolicy" }
I also wonder if I can import sending the whole XML content in the POST. e.g.: { "file": "XML CONTENT...", "name": "NewPolicy" }
None of them above seems to be working for me, the error that I'm mostly getting is "Invalid Path" but I can see the XML files on /var/ts/var/rest (that is the location that it's saving the files after the export).
Has anyone tried to do something similar or used the import policy at all ?