Add support for Object Storage Gen 2#503
Merged
ezilber-akamai merged 8 commits intolinode:devfrom Feb 5, 2025
Merged
Conversation
linode_api4/groups/object_storage.py
Outdated
Comment on lines
331
to
332
| s3_endpoint: str = None, | ||
| endpoint_type: ObjectStorageEndpointType = None, |
Contributor
There was a problem hiding this comment.
Could these two be given Optional[...] types to be consistent with their default values?
|
|
||
|
|
||
| @dataclass | ||
| class ObjectStorageEndpoint(JSONObject): |
Comment on lines
90
to
93
| if json is not None: | ||
| cluster_or_region = json.get("region") or json.get("cluster") | ||
| if parent_id is None and cluster_or_region: | ||
| parent_id = cluster_or_region |
Contributor
There was a problem hiding this comment.
optional: This snippet can be simplified a bit 🙂
Suggested change
| if json is not None: | |
| cluster_or_region = json.get("region") or json.get("cluster") | |
| if parent_id is None and cluster_or_region: | |
| parent_id = cluster_or_region | |
| if json is not None: | |
| parent_id = parent_id or json.get("region") or json.get("cluster") |
lgarber-akamai
approved these changes
Feb 5, 2025
Contributor
lgarber-akamai
left a comment
There was a problem hiding this comment.
All tests are passing on my end and the implementation looks great other than a small style suggestion. Great work!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Added support for OBJ Gen 2. Also fixed issue with cluster_id and region ambiguity.
✔️ How to Test
Unit Tests
make test-unitIntegration Tests
make test-int TEST_SUITE=object_storage