-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add support for all-projects to incus image list and API #400
Add support for all-projects to incus image list and API #400
Conversation
Looks good, just suggested a small edit to make it slightly clearer what API endpoint is touched and what's added. As we're going to want the pull request to include all the commits for this new feature, I'm going to mark the pull request as draft for now. Feel free to add the commits to this one as you get them ready and I'll keep an eye and review as they show up. |
9a42a8c
to
f6c4baa
Compare
2824d99
to
384204e
Compare
@stgraber Do I need to do anything to resolve these conflicts? |
ffdd6f5
to
d1fd0ec
Compare
Did the rebase now, going to do a full review shortly |
Signed-off-by: Mahesh Punjabi <[email protected]>
55dee44
to
895a2f0
Compare
Signed-off-by: Mahesh Punjabi <[email protected]>
Signed-off-by: Mahesh Punjabi <[email protected]>
895a2f0
to
44819e3
Compare
Signed-off-by: Mahesh Punjabi <[email protected]>
Signed-off-by: Mahesh Punjabi <[email protected]>
Signed-off-by: Mahesh Punjabi <[email protected]>
Signed-off-by: Mahesh Punjabi <[email protected]>
44819e3
to
c28320b
Compare
Closes #390 |
What was changed?
Following guidance from issue 390 with a couple of additional changes to support project column in output.
api: images_all_projects :
new API extension to both internal/version/api.go and doc/api-extensions.md
incusd/images: Add support for all_projects:
Add support for all-projects to cmd/incusd/images.go for the imagesGet function.
Include adding the all-projects to the swagger comments on imagesGet.
Also, add Project field to Image struct and update value in GetImageByFingerprintPrefix in shared/api/image.go and internal/server/db/images.go respectively
doc/rest-api: Refresh swagger YAML
Re-generate the swagger YAML data
client: Add GetImagesAllProjects
Add a new GetImagesAllProjects function to client/incus_images.go and add that function to the ImageServer interface in client/interfaces.go
Implement it in client/simplestreams_images.go as an alias for the standard GetImages.
incus/image: Add --all-projects flag to list
Add the new argument to cmd/incus/image.go, when passed, call GetImagesAllProjects instead of GetImages.
Also, add shorthad char e(for Project) and print project name when passed
i18n: Update translation templates
Re-generate the translation template for the new CLI string.
Tests:
gofmt -d passed(for api.go)
make completed fine