Skip to content

Commit 5c515c3

Browse files
authored
fix tier version url (#691)
1 parent fc401f5 commit 5c515c3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lke_clusters.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,13 @@ func (c *Client) GetLKEVersion(ctx context.Context, version string) (*LKEVersion
204204
// ListLKETierVersions lists all Kubernetes versions available given tier through LKE.
205205
// NOTE: This endpoint may not currently be available to all users and can only be used with v4beta.
206206
func (c *Client) ListLKETierVersions(ctx context.Context, tier string, opts *ListOptions) ([]LKETierVersion, error) {
207-
return getPaginatedResults[LKETierVersion](ctx, c, formatAPIPath("lke/versions/%s", tier), opts)
207+
return getPaginatedResults[LKETierVersion](ctx, c, formatAPIPath("lke/tiers/%s/versions", tier), opts)
208208
}
209209

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

216216
// ListLKEClusterAPIEndpoints gets the API Endpoint for the LKE Cluster specified

test/integration/fixtures/TestLKETierVersion_ListAndGet.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ interactions:
1111
- application/json
1212
User-Agent:
1313
- linodego/dev https://github.com/linode/linodego
14-
url: https://api.linode.com/v4beta/lke/versions/standard?page=1
14+
url: https://api.linode.com/v4beta/lke/tiers/standard/versions?page=1
1515
method: GET
1616
response:
17-
body: '{"data": [{"id": "1.31", "tier": "standard"}, {"id": "1.30", "tier": "standard"}],
18-
"page": 1, "pages": 1, "results": 2}'
17+
body: '{"data": [{"id": "1.32", "tier": "standard"}, {"id": "1.31", "tier": "standard"},
18+
{"id": "1.30", "tier": "standard"}], "page": 1, "pages": 1, "results": 3}'
1919
headers:
2020
Access-Control-Allow-Credentials:
2121
- "true"
@@ -34,13 +34,13 @@ interactions:
3434
Connection:
3535
- keep-alive
3636
Content-Length:
37-
- "119"
37+
- "155"
3838
Content-Security-Policy:
3939
- default-src 'none'
4040
Content-Type:
4141
- application/json
4242
Expires:
43-
- Mon, 10 Feb 2025 17:36:11 GMT
43+
- Tue, 04 Mar 2025 15:10:20 GMT
4444
Pragma:
4545
- no-cache
4646
Strict-Transport-Security:
@@ -75,10 +75,10 @@ interactions:
7575
- application/json
7676
User-Agent:
7777
- linodego/dev https://github.com/linode/linodego
78-
url: https://api.linode.com/v4beta/lke/versions/standard/1.31
78+
url: https://api.linode.com/v4beta/lke/tiers/standard/versions/1.32
7979
method: GET
8080
response:
81-
body: '{"id": "1.31", "tier": "standard"}'
81+
body: '{"id": "1.32", "tier": "standard"}'
8282
headers:
8383
Access-Control-Allow-Credentials:
8484
- "true"
@@ -103,7 +103,7 @@ interactions:
103103
Content-Type:
104104
- application/json
105105
Expires:
106-
- Mon, 10 Feb 2025 17:36:12 GMT
106+
- Tue, 04 Mar 2025 15:10:20 GMT
107107
Pragma:
108108
- no-cache
109109
Strict-Transport-Security:

0 commit comments

Comments
 (0)