Skip to content

Commit

Permalink
Use listers going through all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mk committed Nov 16, 2023
1 parent 2956883 commit c42b087
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plugins/module_utils/metal/api_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ def get_routes(mpc):

# LISTERS
('metal_project_device', action.LIST): spec_types.Specs(
equinix_metal.DevicesApi(mpc).find_project_devices,
equinix_metal.DevicesApi(mpc).find_project_devices_all_pages,
{'id': 'project_id'},
),
('metal_organization_device', action.LIST): spec_types.Specs(
equinix_metal.DevicesApi(mpc).find_organization_devices,
equinix_metal.DevicesApi(mpc).find_organization_devices_all_pages,
{'id': 'organization_id'},
),
('metal_project', action.LIST): spec_types.Specs(
equinix_metal.ProjectsApi(mpc).find_projects,
equinix_metal.ProjectsApi(mpc).find_projects_all_pages,
),
('metal_organization_project', action.LIST): spec_types.Specs(
equinix_metal.OrganizationsApi(mpc).find_organization_projects,
equinix_metal.OrganizationsApi(mpc).find_organization_projects_all_pages,
{'id': 'organization_id'},
),
('metal_ip_reservation', action.LIST): spec_types.Specs(
Expand All @@ -99,7 +99,7 @@ def get_routes(mpc):
{'id': 'project_id'}
),
('metal_organization', action.LIST): spec_types.Specs(
equinix_metal.OrganizationsApi(mpc).find_organizations,
equinix_metal.OrganizationsApi(mpc).find_organizations_all_pages,
{'personal': 'personal', 'with_projects': 'with_projects'},
),
('metal_operating_system', action.LIST): spec_types.Specs(
Expand All @@ -109,15 +109,15 @@ def get_routes(mpc):
equinix_metal.MetrosApi(mpc).find_metros,
),
('metal_project_hardware_reservation', action.LIST): spec_types.Specs(
equinix_metal.HardwareReservationsApi(mpc).find_project_hardware_reservations,
equinix_metal.HardwareReservationsApi(mpc).find_project_hardware_reservations_all_pages,
{'id': 'project_id'},
),
('metal_vlan', action.LIST): spec_types.Specs(
equinix_metal.VLANsApi(mpc).find_virtual_networks,
{'id': 'project_id'},
),
('metal_connection_project', action.LIST): spec_types.Specs(
equinix_metal.InterconnectionsApi(mpc).project_list_interconnections,
equinix_metal.InterconnectionsApi(mpc).project_list_interconnections_all_pages,
{'id': 'project_id'},
),
('metal_connection_organization', action.LIST): spec_types.Specs(
Expand Down

0 comments on commit c42b087

Please sign in to comment.