Added support for Private Image Sharing#623
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements comprehensive support for Private Image Sharing features, enabling users to create and manage image share groups, tokens, and membership through a new API group. The changes include both the core object models and API client methods, along with extensive test coverage.
Key Changes:
- Added
ImageShareGroupandImageShareGroupTokenclasses with full CRUD operations - Implemented
ImageShareGroupAPIGroupfor managing share groups and tokens - Extended
Imagemodel with sharing status properties - Added comprehensive unit and integration tests
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
linode_api4/objects/image_share_group.py |
New module defining core share group and token objects with methods for managing images and members |
linode_api4/groups/image_share_group.py |
New API group providing client methods for creating and retrieving share groups and tokens |
linode_api4/objects/image.py |
Extended Image model with sharing-related properties and data classes |
linode_api4/objects/__init__.py |
Added export for image share group module |
linode_api4/groups/__init__.py |
Added export for image share group API group |
linode_api4/linode_client.py |
Integrated ImageShareGroupAPIGroup into LinodeClient |
test/unit/objects/image_share_group_test.py |
Comprehensive unit tests for share group and token objects |
test/unit/groups/image_share_group_test.py |
Unit tests for share group API methods |
test/unit/objects/image_test.py |
Updated tests to verify sharing properties on images |
test/fixtures/*.json |
Added fixture files for share group API responses |
linode_api4/groups/linode.py |
Reformatted imports (code style) |
test/integration/linode_client/test_linode_client.py |
Reformatted imports (code style) |
test/unit/groups/linode_test.py |
Reformatted imports (code style) |
test/fixtures/images.json |
Added sharing properties to existing image fixtures |
Comments suppressed due to low confidence (1)
linode_api4/groups/image_share_group.py:1
- The API documentation link for update_member is incorrect. It points to the GET endpoint documentation instead of the PUT endpoint. Should reference the update/PUT endpoint documentation.
from typing import Optional
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lgarber-akamai
left a comment
There was a problem hiding this comment.
Looks great and works well in my local testing.
Note to other reviewers: The integration tests for this are a captured in a separate body of work (TPT-3958)
|
Nice work! |
ce04f89
into
linode:proj/private-image-sharing
📝 Description
Added support for Private Image Sharing features. Also added corresponding unit tests.
✔️ How to Test
The following steps assume you have pulled down this PR locally.
Unit Tests
make test-unit