drydock/python/drydock_provisioner/drivers/node/maasdriver/models
Phil Sphicas 292e94ee2c Avoid expensive MAAS API calls
The MAAS API call "GET /MAAS/api/2.0/machines/" retrieves information
about every machine known to MAAS, which is very slow. The API supports
filtering based on hostname and mac_address (among others), and querying
for power parameters for all nodes at once.

This change modifies identify_baremetal_node to avoid calling refresh on
the full machine list.

Also, the refresh method of ResourceCollectionBase is updated to allow
passing of params, which can be used to take advantage of the filtering.
Note that a filtered call to refresh overwrites the resources collection
to only contain the returned values.

Most calls to Machines.refresh() aren't really needed at all - they are
replaced with a call to Machines.empty_refresh(), which will still make
sure that the API endpoint is accessible but return an empty collection.
(This may get removed entirely in the future.)

Change-Id: Ie58c45e1790c5c827d9d47f5582214ca519946de
2021-07-28 22:56:13 +00:00
..
__init__.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
base.py Avoid expensive MAAS API calls 2021-07-28 22:56:13 +00:00
blockdev.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
boot_resource.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
domain.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
fabric.py (fix) Support non-present networks 2019-02-19 11:26:08 -06:00
interface.py fix: prevent multiple IP assignments 2020-05-30 20:26:40 +00:00
iprange.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
machine.py Avoid expensive MAAS API calls 2021-07-28 22:56:13 +00:00
node_results.py Fix: pep8 airship-drydock-omni-test fix 2018-11-05 18:35:36 +01:00
partition.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
rack_controller.py Disable tgtd service on maas-rack-controller 2019-03-15 15:16:04 -04:00
repository.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
sshkey.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
staticroute.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
subnet.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
tag.py Refactor build to include Go 2018-09-04 13:13:21 -05:00
vlan.py Support multiple rack controllers 2018-10-18 17:04:00 -05:00
volumegroup.py Refactor build to include Go 2018-09-04 13:13:21 -05:00