Skip to content

API: Add all projects support for network zones (from Incus) #14585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 10, 2025

Conversation

kadinsayani
Copy link
Contributor

@kadinsayani kadinsayani commented Dec 4, 2024

This PR adds support for fetching network zones across all projects.

@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Dec 4, 2024
@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch 2 times, most recently from 2d261ad to 80b5b3f Compare December 4, 2024 23:14
@kadinsayani kadinsayani changed the title Network: Add all projects support for network zones (from Incus) API: Add all projects support for network zones (from Incus) Dec 4, 2024
@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch from 80b5b3f to 6699a45 Compare December 4, 2024 23:23
@kadinsayani kadinsayani changed the title API: Add all projects support for network zones (from Incus) WIP: API: Add all projects support for network zones (from Incus) Dec 4, 2024
@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch 4 times, most recently from 2755a82 to 5376741 Compare December 5, 2024 17:12
@kadinsayani kadinsayani changed the title WIP: API: Add all projects support for network zones (from Incus) API: Add all projects support for network zones (from Incus) Dec 5, 2024
@kadinsayani kadinsayani marked this pull request as ready for review December 5, 2024 17:15
@kadinsayani kadinsayani marked this pull request as draft December 5, 2024 17:16
@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch 3 times, most recently from c7a7b9d to 3ca570e Compare December 5, 2024 22:43
@markylaing
Copy link
Contributor

@kadinsayani can you rebase please? Also do you still want me to review?

@kadinsayani
Copy link
Contributor Author

kadinsayani commented Dec 9, 2024

@kadinsayani can you rebase please? Also do you still want me to review?

Sure thing. And yes, please - I'm currently having trouble getting the authorization tests to pass.

@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch from 3ca570e to ae61f5d Compare December 9, 2024 17:31
@kadinsayani kadinsayani marked this pull request as ready for review December 9, 2024 17:31
@kadinsayani kadinsayani marked this pull request as draft December 10, 2024 01:16
@kadinsayani
Copy link
Contributor Author

I'm going to mark this as draft until I have the tests passing, so we can hold off on reviews for now. I've just found this which we may want to include here as well: lxc/incus@9bdeb59.

cc. @markylaing @tomponline

@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch 5 times, most recently from 7f5223f to 05fd56a Compare December 12, 2024 19:53
@kadinsayani
Copy link
Contributor Author

Please can you rebase

Rebased ✅

minaelee
minaelee previously approved these changes Jan 7, 2025
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the tests we have here cover the effective project scenarios that were making the permission checks for complicated?

@kadinsayani
Copy link
Contributor Author

Do the tests we have here cover the effective project scenarios that were making the permission checks for complicated?

Yes, the tests for fetching network zones across all projects in the auth test suite cover those cases.

@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch 2 times, most recently from c8d253d to d3371eb Compare January 9, 2025 15:47
@tomponline
Copy link
Member

Please rebase to include @minaelee doc fix ta

milaiwi and others added 12 commits January 10, 2025 07:12
Signed-off-by: Mohamed Ilaiwi <[email protected]>
(cherry picked from commit 41842f2517cbba7e47445520dce5e89102d6b0d1)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: Mohamed Ilaiwi <[email protected]>
(cherry picked from commit 308834b2d127ca2a42adfee8dc5fc9f18980a036)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: Mohamed Ilaiwi <[email protected]>
(cherry picked from commit f2864c23250e80d2f057c3e0a70743244005721a)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
…LoadByNameAndProject` fails

Since we have already checked permission for a client, don't continue
when a network zone fails to load, but rather return an error.

Signed-off-by: Kadin Sayani <[email protected]>
Signed-off-by: Kadin Sayani <[email protected]>
Signed-off-by: Mohamed Ilaiwi <[email protected]>
(cherry picked from commit 48f3de4b84402faef1741e595292d6d284fd830b)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: Mohamed Ilaiwi <[email protected]>
(cherry picked from commit 3faef152f823f2321dbba18886403195b7ab18d1)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
Signed-off-by: Mohamed Ilaiwi <[email protected]>
(cherry picked from commit f7dc5896def59a6adc8964af0bf10b15e76d9804)
Signed-off-by: Kadin Sayani <[email protected]>
License: Apache-2.0
…g for network zone test

Signed-off-by: Kadin Sayani <[email protected]>
Signed-off-by: Kadin Sayani <[email protected]>
@kadinsayani kadinsayani force-pushed the all-projects-network-zones branch from d3371eb to 85b129b Compare January 10, 2025 14:12
@kadinsayani
Copy link
Contributor Author

Please rebase to include @minaelee doc fix ta

Rebased ✅

@tomponline tomponline merged commit 1527bbf into canonical:main Jan 10, 2025
28 checks passed
@kadinsayani kadinsayani deleted the all-projects-network-zones branch January 10, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants