fmcapi
fmcapi copied to clipboard
Support for bulk object creation
Is your feature request related to a problem? Please describe. There are many objects that allow bulk post operations. The latest version of FMT uses these operations to post network and port objects a lot quicker than doing them in serial.
Describe the solution you'd like I'll be looking at creating a solution to support bulk post operation on the common network and port object types.
Describe alternatives you've considered Posting objects in serial/sequentially works, but if you had many objects to post, it can be time consuming.
Additional context FMT seemed to have some defined limits as to how many objects of a certain type could be in a single bulk post 'due to fmc api limitations'. So will likely have to work through that. I have logs of the FMT output so I'll start with their numbers and go from there.
@manofcolombia Yes, AccessPolicy and PreFilters can bulk add, but cannot bulk update, whereas NetworkObjects can both Post/Put in bulk (from memory).
The other issues with Bulk operations, especially with NetworkObjects that include inheritance, is that you must order the bulk update in child to parent order, which will require a couple of bulk updates, because the NetworkObjects that use inheritance need the object ID referenced in the Parent payload. So you must deploy all the children first, get the IDs, then apply them to the parents, then deploy the parents. Depending on the level of inheritance adopted in your deployments this needs to happen once for each dependency layer.
I have production code that performs these bulk operations but I haven't moved it to fcmapi yet. If you get this done first, great, if not I will look at it in the next couple of weeks.