Skip to content

Commit 869fd18

Browse files
authored
feat(instance): hide deprecated offers (#1065)
1 parent 6f95c18 commit 869fd18

File tree

3 files changed

+53
-49
lines changed

3 files changed

+53
-49
lines changed

internal/namespaces/instance/v1/custom_server_type.go

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,28 @@ var (
3434
// - [APIGW-1932] hide deprecated instance for scw instance server-type list
3535
func serverTypeListBuilder(c *core.Command) *core.Command {
3636
deprecatedNames := map[string]struct{}{
37-
"START1-L": {},
38-
"START1-M": {},
39-
"START1-S": {},
40-
"START1-XS": {},
41-
"VC1L": {},
42-
"VC1M": {},
43-
"VC1S": {},
44-
"X64-120GB": {},
45-
"X64-15GB": {},
46-
"X64-30GB": {},
47-
"X64-60GB": {},
37+
"START1-L": {},
38+
"START1-M": {},
39+
"START1-S": {},
40+
"START1-XS": {},
41+
"VC1L": {},
42+
"VC1M": {},
43+
"VC1S": {},
44+
"X64-120GB": {},
45+
"X64-15GB": {},
46+
"X64-30GB": {},
47+
"X64-60GB": {},
48+
"C1": {},
49+
"C2M": {},
50+
"C2L": {},
51+
"C2S": {},
52+
"ARM64-2GB": {},
53+
"ARM64-4GB": {},
54+
"ARM64-8GB": {},
55+
"ARM64-16GB": {},
56+
"ARM64-32GB": {},
57+
"ARM64-64GB": {},
58+
"ARM64-128GB": {},
4859
}
4960

5061
c.Run = func(ctx context.Context, argsI interface{}) (interface{}, error) {

internal/namespaces/instance/v1/testdata/test-server-type-list-server-type-list.cassette.yaml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interactions:
66
form: {}
77
headers:
88
User-Agent:
9-
- scaleway-sdk-go/v1.0.0-beta.6+dev (go1.13.6; darwin; amd64) cli-e2e-test
9+
- scaleway-sdk-go/v1.0.0-beta.6+dev (go1.14.3; darwin; amd64) cli-e2e-test
1010
url: https://api.scaleway.com/instance/v1/zones/fr-par-1/products/servers
1111
method: GET
1212
response:
@@ -304,17 +304,19 @@ interactions:
304304
Content-Type:
305305
- application/json
306306
Date:
307-
- Fri, 03 Apr 2020 17:55:51 GMT
307+
- Thu, 04 Jun 2020 13:54:41 GMT
308308
Link:
309309
- </products/servers?page=1&per_page=50&>; rel="last"
310310
Server:
311-
- scaleway_api
311+
- agw_listener_public_anycast
312312
Strict-Transport-Security:
313313
- max-age=63072000
314314
X-Content-Type-Options:
315315
- nosniff
316316
X-Frame-Options:
317317
- DENY
318+
X-Request-Id:
319+
- 4d7fab36-8923-4b67-9572-defccce6712e
318320
X-Total-Count:
319321
- "32"
320322
status: 200 OK
@@ -325,48 +327,50 @@ interactions:
325327
form: {}
326328
headers:
327329
User-Agent:
328-
- scaleway-sdk-go/v1.0.0-beta.6+dev (go1.13.6; darwin; amd64) cli-e2e-test
330+
- scaleway-sdk-go/v1.0.0-beta.6+dev (go1.14.3; darwin; amd64) cli-e2e-test
329331
url: https://api.scaleway.com/instance/v1/zones/fr-par-1/products/servers/availability
330332
method: GET
331333
response:
332334
body: '{"servers": {"ARM64-128GB": {"availability": "shortage"}, "ARM64-16GB":
333-
{"availability": "shortage"}, "ARM64-2GB": {"availability": "scarce"}, "ARM64-32GB":
334-
{"availability": "shortage"}, "ARM64-4GB": {"availability": "shortage"}, "ARM64-64GB":
335-
{"availability": "shortage"}, "ARM64-8GB": {"availability": "shortage"}, "C1":
335+
{"availability": "scarce"}, "ARM64-2GB": {"availability": "available"}, "ARM64-32GB":
336+
{"availability": "shortage"}, "ARM64-4GB": {"availability": "available"}, "ARM64-64GB":
337+
{"availability": "shortage"}, "ARM64-8GB": {"availability": "available"}, "C1":
336338
{"availability": "available"}, "C2L": {"availability": "available"}, "C2M":
337-
{"availability": "shortage"}, "C2S": {"availability": "available"}, "DEV1-L":
338-
{"availability": "shortage"}, "DEV1-M": {"availability": "shortage"}, "DEV1-S":
339-
{"availability": "available"}, "DEV1-XL": {"availability": "shortage"}, "GP1-L":
339+
{"availability": "scarce"}, "C2S": {"availability": "available"}, "DEV1-L":
340+
{"availability": "available"}, "DEV1-M": {"availability": "available"}, "DEV1-S":
341+
{"availability": "available"}, "DEV1-XL": {"availability": "available"}, "GP1-L":
340342
{"availability": "available"}, "GP1-M": {"availability": "available"}, "GP1-S":
341343
{"availability": "available"}, "GP1-XL": {"availability": "available"}, "GP1-XS":
342344
{"availability": "available"}, "RENDER-S": {"availability": "available"}, "START1-L":
343-
{"availability": "shortage"}, "START1-M": {"availability": "shortage"}, "START1-S":
345+
{"availability": "available"}, "START1-M": {"availability": "available"}, "START1-S":
344346
{"availability": "available"}, "START1-XS": {"availability": "available"}, "VC1L":
345-
{"availability": "shortage"}, "VC1M": {"availability": "shortage"}, "VC1S":
346-
{"availability": "scarce"}, "X64-120GB": {"availability": "available"}, "X64-15GB":
347+
{"availability": "available"}, "VC1M": {"availability": "available"}, "VC1S":
348+
{"availability": "available"}, "X64-120GB": {"availability": "available"}, "X64-15GB":
347349
{"availability": "available"}, "X64-30GB": {"availability": "available"}, "X64-60GB":
348350
{"availability": "available"}}}'
349351
headers:
350352
Cache-Control:
351353
- no-cache
352354
Content-Length:
353-
- "1330"
355+
- "1341"
354356
Content-Security-Policy:
355357
- default-src 'none'; frame-ancestors 'none'
356358
Content-Type:
357359
- application/json
358360
Date:
359-
- Fri, 03 Apr 2020 17:55:52 GMT
361+
- Thu, 04 Jun 2020 13:54:41 GMT
360362
Link:
361363
- </products/servers/availability?page=1&per_page=50&>; rel="last"
362364
Server:
363-
- scaleway_api
365+
- agw_listener_public_anycast
364366
Strict-Transport-Security:
365367
- max-age=63072000
366368
X-Content-Type-Options:
367369
- nosniff
368370
X-Frame-Options:
369371
- DENY
372+
X-Request-Id:
373+
- 47a8d037-b2fc-4bcc-b065-8f0684f9a463
370374
X-Total-Count:
371375
- "32"
372376
status: 200 OK
Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
1-
NAME MONTHLY PRICE HOURLY PRICE LOCAL VOLUME SIZE CPU GPU RAM ARCH AVAILABILITY
2-
ARM64-2GB € 2.99 € 0.006 50 GB 4 2.0 GiB arm64 low stock
3-
ARM64-4GB € 5.99 € 0.012 100 GB 6 4.0 GiB arm64 out of stock
4-
ARM64-8GB € 11.99 € 0.024 200 GB 8 8.0 GiB arm64 out of stock
5-
ARM64-16GB € 34.99 € 0.07 200 GB 16 16 GiB arm64 out of stock
6-
ARM64-32GB € 69.99 € 0.14 300 GB 32 32 GiB arm64 out of stock
7-
ARM64-64GB € 139.99 € 0.28 400 GB 48 64 GiB arm64 out of stock
8-
ARM64-128GB € 279.99 € 0.56 500 GB 64 128 GiB arm64 out of stock
9-
C1 € 2.99 € 0.006 50 GB 4 2.0 GiB arm available
10-
C2L € 23.99 € 0.048 50 GB 8 32 GiB x86_64 available
11-
C2M € 17.99 € 0.036 50 GB 8 16 GiB x86_64 out of stock
12-
C2S € 11.99 € 0.024 50 GB 4 8.0 GiB x86_64 available
13-
DEV1-S € 2.99 € 0.006 20 GB 2 2.0 GiB x86_64 available
14-
DEV1-M € 7.99 € 0.016 40 GB 3 4.0 GiB x86_64 out of stock
15-
DEV1-L € 15.99 € 0.032 80 GB 4 8.0 GiB x86_64 out of stock
16-
DEV1-XL € 23.99 € 0.048 120 GB 4 12 GiB x86_64 out of stock
17-
GP1-XS € 39.00 € 0.078 150 GB 4 16 GiB x86_64 available
18-
GP1-S € 79.00 € 0.158 300 GB 8 32 GiB x86_64 available
19-
GP1-M € 159.00 € 0.318 600 GB 16 64 GiB x86_64 available
20-
GP1-L € 299.00 € 0.598 600 GB 32 128 GiB x86_64 available
21-
GP1-XL € 569.00 € 1.138 600 GB 48 256 GiB x86_64 available
22-
RENDER-S € 499.99 € 1.00 400 GB 10 1 45 GiB x86_64 available
1+
NAME MONTHLY PRICE HOURLY PRICE LOCAL VOLUME SIZE CPU GPU RAM ARCH AVAILABILITY
2+
DEV1-S € 2.99 € 0.006 20 GB 2 2.0 GiB x86_64 available
3+
DEV1-M € 7.99 € 0.016 40 GB 3 4.0 GiB x86_64 available
4+
DEV1-L € 15.99 € 0.032 80 GB 4 8.0 GiB x86_64 available
5+
DEV1-XL € 23.99 € 0.048 120 GB 4 12 GiB x86_64 available
6+
GP1-XS € 39.00 € 0.078 150 GB 4 16 GiB x86_64 available
7+
GP1-S € 79.00 € 0.158 300 GB 8 32 GiB x86_64 available
8+
GP1-M € 159.00 € 0.318 600 GB 16 64 GiB x86_64 available
9+
GP1-L € 299.00 € 0.598 600 GB 32 128 GiB x86_64 available
10+
GP1-XL € 569.00 € 1.138 600 GB 48 256 GiB x86_64 available
11+
RENDER-S € 499.99 € 1.00 400 GB 10 1 45 GiB x86_64 available

0 commit comments

Comments
 (0)