Skip to content

Commit d35d8e4

Browse files
authored
doc: add deprecation notice on generated commands (#1445)
1 parent eb972ea commit d35d8e4

18 files changed

+1041
-215
lines changed

cmd/scw/testdata/test-all-usage-instance-image-create-usage.golden

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ EXAMPLES:
1010
scw instance image create name=foobar root-volume=11111111-1111-1111-1111-111111111111 arch=x86_64
1111

1212
ARGS:
13-
[name=<generated>] Name of the image
14-
snapshot-id UUID of the snapshot that will be used as root volume in the image
15-
arch Architecture of the image (x86_64 | arm)
16-
[default-bootscript] Default bootscript of the image
17-
[additional-snapshots.{key}.id] UUID of the snapshot to add
18-
[additional-snapshots.{key}.name] Name of the additional snapshot
19-
[additional-snapshots.{key}.size] Size of the additional snapshot
20-
[additional-snapshots.{key}.volume-type] Underlying volume type of the additional snapshot (l_ssd | b_ssd)
21-
[additional-snapshots.{key}.project-id] Project ID that own the additional snapshot
13+
[name=<generated>] Name of the image
14+
snapshot-id UUID of the snapshot that will be used as root volume in the image
15+
arch Architecture of the image (x86_64 | arm)
16+
[default-bootscript] Default bootscript of the image
17+
[additional-snapshots.{key}.id] UUID of the snapshot to add
18+
[additional-snapshots.{key}.name] Name of the additional snapshot
19+
[additional-snapshots.{key}.size] Size of the additional snapshot
20+
[additional-snapshots.{key}.volume-type] Underlying volume type of the additional snapshot (l_ssd | b_ssd)
21+
[additional-snapshots.{key}.project-id] Project ID that own the additional snapshot
22+
[project-id] Project ID to use. If none is passed the default project ID will be used
23+
[public] True to create a public image
24+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
25+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)
26+
27+
DEPRECATED ARGS:
2228
[additional-snapshots.{key}.organization-id] Organization ID that own the additional snapshot
23-
[project-id] Project ID to use. If none is passed the default project ID will be used
24-
[public] True to create a public image
25-
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
26-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)
2729

2830
FLAGS:
2931
-h, --help help for create

cmd/scw/testdata/test-all-usage-instance-security-group-create-usage.golden

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ ARGS:
2525
name=<generated> Name of the security group
2626
[description] Description of the security group
2727
[project-id] Project ID to use. If none is passed the default project ID will be used
28-
[organization-default=false] Whether this security group becomes the default security group for new instances
2928
[project-default=false] Whether this security group becomes the default security group for new instances
3029
[stateful=true] Whether the security group is stateful or not
3130
[inbound-default-policy=accept] Default policy for inbound rules (accept | drop)
3231
[outbound-default-policy=accept] Default policy for outbound rules (accept | drop)
3332
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
3433
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)
3534

35+
DEPRECATED ARGS:
36+
[organization-default=false] Whether this security group becomes the default security group for new instances
37+
3638
FLAGS:
3739
-h, --help help for create
3840

cmd/scw/testdata/test-all-usage-iot-device-list-usage.golden

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ ARGS:
99
[order-by] Ordering of requested devices (name_asc | name_desc | status_asc | status_desc | hub_id_asc | hub_id_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | allow_insecure_asc | allow_insecure_desc)
1010
[name] Filter on the name
1111
[hub-id] Filter on the hub
12-
[enabled] Deprecated, ignored filter
1312
[allow-insecure] Filter on the allow_insecure flag
14-
[is-connected] Deprecated, ignored filter
1513
[organization-id] Filter on the organization
1614
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
1715

16+
DEPRECATED ARGS:
17+
[enabled] Deprecated, ignored filter
18+
[is-connected] Deprecated, ignored filter
19+
1820
FLAGS:
1921
-h, --help help for list
2022

cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ ARGS:
2626
[health-check.check-delay]
2727
lb-id Load balancer ID
2828
server-ip.{index} Backend server IP addresses list (IPv4 or IPv6)
29-
[send-proxy-v2] Deprecated in favor of proxy_protocol field !
3029
[timeout-server] Maximum server connection inactivity time
3130
[timeout-connect] Maximum initical server connection establishment time
3231
[timeout-tunnel] Maximum tunnel inactivity time
3332
[on-marked-down-action] Modify what occurs when a backend server is marked down (on_marked_down_action_none | shutdown_sessions)
3433
[proxy-protocol] PROXY protocol, forward client's address (must be supported by backend servers software) (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
3534
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
3635

36+
DEPRECATED ARGS:
37+
[send-proxy-v2] Deprecated in favor of proxy_protocol field !
38+
3739
FLAGS:
3840
-h, --help help for create
3941

cmd/scw/testdata/test-all-usage-lb-backend-update-usage.golden

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ ARGS:
1313
[forward-port-algorithm] (roundrobin | leastconn)
1414
[sticky-sessions] (none | cookie | table)
1515
[sticky-sessions-cookie-name]
16-
[send-proxy-v2]
1716
[timeout-server]
1817
[timeout-connect]
1918
[timeout-tunnel]
2019
[on-marked-down-action] (on_marked_down_action_none | shutdown_sessions)
2120
[proxy-protocol] (proxy_protocol_unknown | proxy_protocol_none | proxy_protocol_v1 | proxy_protocol_v2 | proxy_protocol_v2_ssl | proxy_protocol_v2_ssl_cn)
2221
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
2322

23+
DEPRECATED ARGS:
24+
[send-proxy-v2]
25+
2426
FLAGS:
2527
-h, --help help for update
2628

cmd/scw/testdata/test-all-usage-lb-frontend-create-usage.golden

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ ARGS:
1111
lb-id Load balancer ID
1212
backend-id Backend ID
1313
[timeout-client] Set the maximum inactivity time on the client side
14-
[certificate-id] Certificate ID, deprecated in favor of certificate_ids array !
1514
[certificate-ids.{index}] List of certificate IDs to bind on the frontend
1615
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
1716

17+
DEPRECATED ARGS:
18+
[certificate-id] Certificate ID, deprecated in favor of certificate_ids array !
19+
1820
FLAGS:
1921
-h, --help help for create
2022

cmd/scw/testdata/test-all-usage-lb-frontend-update-usage.golden

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ ARGS:
1111
inbound-port TCP port to listen on the front side
1212
backend-id Backend ID
1313
[timeout-client] Client session maximum inactivity time
14-
[certificate-id] Certificate ID, deprecated in favor of `certificate_ids` array!
1514
[certificate-ids.{index}] List of certificate IDs to bind on the frontend
1615
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
1716

17+
DEPRECATED ARGS:
18+
[certificate-id] Certificate ID, deprecated in favor of `certificate_ids` array!
19+
1820
FLAGS:
1921
-h, --help help for update
2022

internal/namespaces/account/v2alpha1/account_cli.go

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,32 @@ func accountSSHKeyList() *core.Command {
5252
Namespace: "account",
5353
Resource: "ssh-key",
5454
Verb: "list",
55-
ArgsType: reflect.TypeOf(account.ListSSHKeysRequest{}),
55+
// Deprecated: false,
56+
ArgsType: reflect.TypeOf(account.ListSSHKeysRequest{}),
5657
ArgSpecs: core.ArgSpecs{
5758
{
5859
Name: "order-by",
5960
Required: false,
61+
Deprecated: false,
6062
Positional: false,
6163
EnumValues: []string{"created_at_asc", "created_at_desc", "updated_at_asc", "updated_at_desc", "name_asc", "name_desc"},
6264
},
6365
{
6466
Name: "name",
6567
Required: false,
68+
Deprecated: false,
6669
Positional: false,
6770
},
6871
{
6972
Name: "project-id",
7073
Required: false,
74+
Deprecated: false,
7175
Positional: false,
7276
},
7377
{
7478
Name: "organization-id",
7579
Required: false,
80+
Deprecated: false,
7681
Positional: false,
7782
},
7883
},
@@ -127,18 +132,21 @@ func accountSSHKeyAdd() *core.Command {
127132
Namespace: "account",
128133
Resource: "ssh-key",
129134
Verb: "add",
130-
ArgsType: reflect.TypeOf(account.CreateSSHKeyRequest{}),
135+
// Deprecated: false,
136+
ArgsType: reflect.TypeOf(account.CreateSSHKeyRequest{}),
131137
ArgSpecs: core.ArgSpecs{
132138
{
133139
Name: "name",
134140
Short: `The name of the SSH key`,
135141
Required: false,
142+
Deprecated: false,
136143
Positional: false,
137144
},
138145
{
139146
Name: "public-key",
140147
Short: `SSH public key. Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported`,
141148
Required: true,
149+
Deprecated: false,
142150
Positional: false,
143151
},
144152
core.ProjectIDArgSpec(),
@@ -178,12 +186,14 @@ func accountSSHKeyGet() *core.Command {
178186
Namespace: "account",
179187
Resource: "ssh-key",
180188
Verb: "get",
181-
ArgsType: reflect.TypeOf(account.GetSSHKeyRequest{}),
189+
// Deprecated: false,
190+
ArgsType: reflect.TypeOf(account.GetSSHKeyRequest{}),
182191
ArgSpecs: core.ArgSpecs{
183192
{
184193
Name: "ssh-key-id",
185194
Short: `The ID of the SSH key`,
186195
Required: true,
196+
Deprecated: false,
187197
Positional: true,
188198
},
189199
},
@@ -205,17 +215,20 @@ func accountSSHKeyUpdate() *core.Command {
205215
Namespace: "account",
206216
Resource: "ssh-key",
207217
Verb: "update",
208-
ArgsType: reflect.TypeOf(account.UpdateSSHKeyRequest{}),
218+
// Deprecated: false,
219+
ArgsType: reflect.TypeOf(account.UpdateSSHKeyRequest{}),
209220
ArgSpecs: core.ArgSpecs{
210221
{
211222
Name: "ssh-key-id",
212223
Required: true,
224+
Deprecated: false,
213225
Positional: true,
214226
},
215227
{
216228
Name: "name",
217229
Short: `Name of the SSH key`,
218230
Required: false,
231+
Deprecated: false,
219232
Positional: false,
220233
},
221234
},
@@ -237,11 +250,13 @@ func accountSSHKeyRemove() *core.Command {
237250
Namespace: "account",
238251
Resource: "ssh-key",
239252
Verb: "remove",
240-
ArgsType: reflect.TypeOf(account.DeleteSSHKeyRequest{}),
253+
// Deprecated: false,
254+
ArgsType: reflect.TypeOf(account.DeleteSSHKeyRequest{}),
241255
ArgSpecs: core.ArgSpecs{
242256
{
243257
Name: "ssh-key-id",
244258
Required: true,
259+
Deprecated: false,
245260
Positional: true,
246261
},
247262
},

0 commit comments

Comments
 (0)