Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yec-akamai committed Mar 4, 2025
1 parent 81eeacd commit f03df34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lke_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ func (c *Client) GetLKEVersion(ctx context.Context, version string) (*LKEVersion
// ListLKETierVersions lists all Kubernetes versions available given tier through LKE.
// NOTE: This endpoint may not currently be available to all users and can only be used with v4beta.
func (c *Client) ListLKETierVersions(ctx context.Context, tier string, opts *ListOptions) ([]LKETierVersion, error) {
return getPaginatedResults[LKETierVersion](ctx, c, formatAPIPath("lke/versions/%s", tier), opts)
return getPaginatedResults[LKETierVersion](ctx, c, formatAPIPath("lke/tiers/%s/versions", tier), opts)
}

// GetLKETierVersion gets the details of a specific LKE tier version.
// NOTE: This endpoint may not currently be available to all users and can only be used with v4beta.
func (c *Client) GetLKETierVersion(ctx context.Context, tier string, versionID string) (*LKETierVersion, error) {
return doGETRequest[LKETierVersion](ctx, c, formatAPIPath("lke/versions/%s/%s", tier, versionID))
return doGETRequest[LKETierVersion](ctx, c, formatAPIPath("lke/tiers/%s/versions/%s", tier, versionID))
}

// ListLKEClusterAPIEndpoints gets the API Endpoint for the LKE Cluster specified
Expand Down
16 changes: 8 additions & 8 deletions test/integration/fixtures/TestLKETierVersion_ListAndGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/versions/standard?page=1
url: https://api.linode.com/v4beta/lke/tiers/standard/versions?page=1
method: GET
response:
body: '{"data": [{"id": "1.31", "tier": "standard"}, {"id": "1.30", "tier": "standard"}],
"page": 1, "pages": 1, "results": 2}'
body: '{"data": [{"id": "1.32", "tier": "standard"}, {"id": "1.31", "tier": "standard"},
{"id": "1.30", "tier": "standard"}], "page": 1, "pages": 1, "results": 3}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -34,13 +34,13 @@ interactions:
Connection:
- keep-alive
Content-Length:
- "119"
- "155"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 10 Feb 2025 17:36:11 GMT
- Tue, 04 Mar 2025 15:10:20 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down Expand Up @@ -75,10 +75,10 @@ interactions:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/lke/versions/standard/1.31
url: https://api.linode.com/v4beta/lke/tiers/standard/versions/1.32
method: GET
response:
body: '{"id": "1.31", "tier": "standard"}'
body: '{"id": "1.32", "tier": "standard"}'
headers:
Access-Control-Allow-Credentials:
- "true"
Expand All @@ -103,7 +103,7 @@ interactions:
Content-Type:
- application/json
Expires:
- Mon, 10 Feb 2025 17:36:12 GMT
- Tue, 04 Mar 2025 15:10:20 GMT
Pragma:
- no-cache
Strict-Transport-Security:
Expand Down

0 comments on commit f03df34

Please sign in to comment.