Skip to content

TPT-4427: add locks field to various resources#942

Open
zliang-akamai wants to merge 2 commits intolinode:mainfrom
zliang-akamai:zhiwei/more-entities-lock
Open

TPT-4427: add locks field to various resources#942
zliang-akamai wants to merge 2 commits intolinode:mainfrom
zliang-akamai:zhiwei/more-entities-lock

Conversation

@zliang-akamai
Copy link
Copy Markdown
Member

@zliang-akamai zliang-akamai commented Apr 22, 2026

📝 Description

Add locks attribute to many supported resources.

✔️ How to Test

make test-unit

@zliang-akamai zliang-akamai force-pushed the zhiwei/more-entities-lock branch from c47e477 to 8ea6cc1 Compare April 22, 2026 00:53
@zliang-akamai zliang-akamai marked this pull request as ready for review April 30, 2026 13:39
@zliang-akamai zliang-akamai requested review from a team as code owners April 30, 2026 13:39
@zliang-akamai zliang-akamai requested review from dawiddzhafarov and psnoch-akamai and removed request for a team April 30, 2026 13:39
Copilot AI review requested due to automatic review settings May 7, 2026 14:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the SDK’s resource models (and corresponding unit-test fixtures/assertions) to surface the API’s locks attribute on additional resource types, allowing clients to inspect deletion-protection locks returned by the API (notably under v4beta).

Changes:

  • Added Locks []LockType to Volume, LKECluster, and LKENodePool structs.
  • Updated unit tests to assert locks deserialization for volumes, LKE clusters, and LKE node pools.
  • Updated unit-test JSON fixtures to include the new locks field.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
volumes.go Adds Locks field to Volume model for API response decoding.
lke_clusters.go Adds Locks field to LKECluster model for API response decoding.
lke_node_pools.go Adds Locks field to LKENodePool model for API response decoding.
instances.go Clarifies comment describing which lock types apply to Instances.
test/unit/volume_test.go Adds assertions verifying Volume.Locks is decoded from fixtures.
test/unit/lke_clusters_test.go Adds assertions verifying LKECluster.Locks is decoded from fixtures.
test/unit/lke_node_pools_test.go Adds assertions verifying LKENodePool.Locks is decoded from fixtures.
test/unit/fixtures/volumes_list.json Adds locks to volumes list fixture.
test/unit/fixtures/volume_get.json Adds locks to volume get fixture.
test/unit/fixtures/lke_node_pool_list.json Adds locks to LKE node pool list fixture (including empty array case).
test/unit/fixtures/lke_node_pool_get.json Adds locks to LKE node pool get fixture.
test/unit/fixtures/lke_cluster_list.json Adds locks to LKE cluster list fixture (including empty array case).
test/unit/fixtures/lke_cluster_get.json Adds locks to LKE cluster get fixture.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants