mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 15:14:45 -03:30
allow system admins, org admins, and inventory admins to bulk create hosts. Testing on an "open" licensed awx as system admin, I created 1000 hosts with 6 queries in ~ 0.15 seconds Testing on an "open" licensed awx as organization admin, I created 1000 hosts with 11 queries in ~ 0.15 seconds fix org max host check also only do permission denied if license is a trial add /api/v2/bulk to list bulk apis available add api description templates One motiviation to not take a list of hosts with mixed inventories is to keep things simple re: RBAC and keeping a constant number of queries. If there is great clamor for accepting list of hosts to insert into arbitrary different inventories, we could probably make it happen - we'd need to pop the inventory off of each of the hosts, run the HostSerializer validate, then in top level BulkHostCreateSerializer fetch all the inventories/check permissions/org host limits for those inventories/etc. But that makes this that much more complicated. add test for rbac access test also helped me find a bug in a query, fixed that add test to assert num queries scales as expected also move other test to dedicated file also test with super user like I meant to record activity stream for the inventory this records that a certain number of hosts were added by a certain user we could consider if there is any other additional information we want to include
65 B
65 B
Bulk Actions
This endpoint lists available bulk action APIs.