feat: Add missing container-registry commands#124
Conversation
240151c to
db4f228
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds container registry user management commands to the OVHcloud CLI, enabling users to list, get, create, set admin privileges, and delete container registry users. The implementation follows the existing pattern of the codebase with proper API endpoints, templates, and comprehensive test coverage.
Changes:
- Added five new user management commands: list, get, create, set-as-admin, and delete
- Created user-specific template and parameter sample files
- Added plan information display to the container registry template
- Generated complete documentation for all new commands
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/services/cloud/templates/cloud_container_registry_user.tmpl | New template for displaying user information |
| internal/services/cloud/templates/cloud_container_registry.tmpl | Added plan name field to registry display |
| internal/services/cloud/parameter-samples/container-registry-user-create.json | Sample JSON for user creation parameters |
| internal/services/cloud/cloud_container_registry.go | Implemented five user management functions and data structures |
| internal/cmd/cloud_container_registry_test.go | Comprehensive test suite covering all user operations |
| internal/cmd/cloud_container_registry.go | Command definitions and flag configurations for user management |
| doc/ovhcloud_cloud_container-registry_users_set-as-admin.md | Generated documentation for set-as-admin command |
| doc/ovhcloud_cloud_container-registry_users_list.md | Generated documentation for list command |
| doc/ovhcloud_cloud_container-registry_users_get.md | Generated documentation for get command |
| doc/ovhcloud_cloud_container-registry_users_delete.md | Generated documentation for delete command |
| doc/ovhcloud_cloud_container-registry_users_create.md | Generated documentation for create command |
| doc/ovhcloud_cloud_container-registry_users.md | Generated documentation for users parent command |
| doc/ovhcloud_cloud_container-registry.md | Updated to reference new users subcommand |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ee8dc42 to
8d4ebaf
Compare
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
89a6242 to
21ec388
Compare
9005a37 to
5f5e019
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (6)
internal/cmd/cloud_container_registry_test.go:1
- Multiple test cases use timestamps in 2026. Consider using past dates or dates relative to test execution time for consistency with testing best practices.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Multiple test cases use timestamps in 2026. Consider using past dates or dates relative to test execution time for consistency with testing best practices.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Multiple test cases use timestamps in 2026. Consider using past dates or dates relative to test execution time for consistency with testing best practices.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Multiple test cases use timestamps in 2026. Consider using past dates or dates relative to test execution time for consistency with testing best practices.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Multiple test cases use timestamps in 2026. Consider using past dates or dates relative to test execution time for consistency with testing best practices.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Multiple test cases use timestamps in 2026. Consider using past dates or dates relative to test execution time for consistency with testing best practices.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
0b652b6 to
61b543b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (5)
internal/cmd/cloud_reference_test.go:1
- Test data contains multiple timestamps in 2026, which is in the future. Consider using dates that are in the past or relative to the current date to make the test data more realistic and avoid potential confusion.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_reference_test.go:1
- Test data contains multiple timestamps in 2026, which is in the future. Consider using dates that are in the past or relative to the current date to make the test data more realistic and avoid potential confusion.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_reference_test.go:1
- Test data contains multiple timestamps in 2026, which is in the future. Consider using dates that are in the past or relative to the current date to make the test data more realistic and avoid potential confusion.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_reference_test.go:1
- Test data contains multiple timestamps in 2026, which is in the future. Consider using dates that are in the past or relative to the current date to make the test data more realistic and avoid potential confusion.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_reference_test.go:1
- Test data contains multiple timestamps in 2026, which is in the future. Consider using dates that are in the past or relative to the current date to make the test data more realistic and avoid potential confusion.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
61b543b to
f7d69bb
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (7)
internal/cmd/cloud_container_registry_test.go:1
- Test data consistently uses dates in 2026. While this may be acceptable for test fixtures, consider using past dates or clearly marked future dates to avoid confusion about test data validity.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Test data consistently uses dates in 2026. While this may be acceptable for test fixtures, consider using past dates or clearly marked future dates to avoid confusion about test data validity.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Test data consistently uses dates in 2026. While this may be acceptable for test fixtures, consider using past dates or clearly marked future dates to avoid confusion about test data validity.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Test data consistently uses dates in 2026. While this may be acceptable for test fixtures, consider using past dates or clearly marked future dates to avoid confusion about test data validity.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Test data consistently uses dates in 2026. While this may be acceptable for test fixtures, consider using past dates or clearly marked future dates to avoid confusion about test data validity.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Test data consistently uses dates in 2026. While this may be acceptable for test fixtures, consider using past dates or clearly marked future dates to avoid confusion about test data validity.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
internal/cmd/cloud_container_registry_test.go:1
- Test data consistently uses dates in 2026. While this may be acceptable for test fixtures, consider using past dates or clearly marked future dates to avoid confusion about test data validity.
// SPDX-FileCopyrightText: 2025 OVH SAS <opensource@ovh.net>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
f7d69bb to
491546f
Compare
|
@amstuta Thank you for your review, I applied your comments and renamed some command variables to harmonize. |
Description
Add several missing container-registry commands.
Type of change
Please delete options that are not relevant.
Checklist:
make docgo mod tidy