Skip to content

Commit

Permalink
feat(instance): documentation improvments (#1417)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Sep 9, 2020
1 parent f7ee6a4 commit 0569a57
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ EXAMPLES:

ARGS:
[name=<generated>] Name of the placement group
[project-id]
[policy-mode] (optional | enforced)
[policy-type] (max_availability | low_latency)
[project-id] Project ID of the placement group
[policy-mode] The operating mode of the placement group (optional | enforced)
[policy-type] The policy type of the placement group (max_availability | low_latency)
[organization-id] Organization ID to use. If none is passed will use default organization ID from the config
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ EXAMPLES:
ARGS:
[name=<generated>] Name of the snapshot
volume-id UUID of the volume
[project-id]
[project-id] Project ID of the snapshot
[organization-id] Organization ID to use. If none is passed will use default organization ID from the config
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ EXAMPLES:
scw instance volume create volume-type=l_ssd base-volume=00112233-4455-6677-8899-aabbccddeeff

ARGS:
[name]
[volume-type] (l_ssd | b_ssd)
[size]
[base-volume]
[base-snapshot]
[project-id]
[name] The volume name
[project-id] The volume project ID
[volume-type] The volume type (l_ssd | b_ssd)
[size] The volume disk size
[base-volume] The ID of the volume on which this volume will be based
[base-snapshot] The ID of the snapshot on which this volume will be based
[organization-id] Organization ID to use. If none is passed will use default organization ID from the config
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | nl-ams-1)

Expand Down
6 changes: 3 additions & 3 deletions cmd/scw/testdata/test-all-usage-iot-device-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ USAGE:
scw iot device list [arg=value ...]

ARGS:
[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 | enabled_asc | enabled_desc | allow_insecure_asc | allow_insecure_desc | last_seen_at_asc | last_seen_at_desc)
[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)
[name] Filter on the name
[hub-id] Filter on the hub
[enabled] Filter on the enabled flag
[enabled] Deprecated, ignored filter
[allow-insecure] Filter on the allow_insecure flag
[is-connected] Filter on the is_connected state
[is-connected] Deprecated, ignored filter
[organization-id] Filter on the organization
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-iot-hub-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USAGE:
scw iot hub list [arg=value ...]

ARGS:
[order-by] Ordering of requested hub (name_asc | name_desc | status_asc | status_desc | product_plan_asc | product_plan_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | enabled_asc | enabled_desc)
[order-by] Ordering of requested hub (name_asc | name_desc | status_asc | status_desc | product_plan_asc | product_plan_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
[name] Filter on the name
[organization-id] Filter on the organization
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
Expand Down
20 changes: 15 additions & 5 deletions internal/namespaces/instance/v1/instance_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@ func instanceSnapshotCreate() *core.Command {
},
{
Name: "project",
Short: `Project ID of the snapshot`,
Required: false,
Positional: false,
},
Expand Down Expand Up @@ -1372,32 +1373,38 @@ func instanceVolumeCreate() *core.Command {
ArgSpecs: core.ArgSpecs{
{
Name: "name",
Short: `The volume name`,
Required: false,
Positional: false,
},
{
Name: "project",
Short: `The volume project ID`,
Required: false,
Positional: false,
},
{
Name: "volume-type",
Short: `The volume type`,
Required: false,
Positional: false,
EnumValues: []string{"l_ssd", "b_ssd"},
},
{
Name: "size",
Short: `The volume disk size`,
Required: false,
Positional: false,
},
{
Name: "base-volume",
Short: `The ID of the volume on which this volume will be based`,
Required: false,
Positional: false,
},
{
Name: "base-snapshot",
Required: false,
Positional: false,
},
{
Name: "project",
Short: `The ID of the snapshot on which this volume will be based`,
Required: false,
Positional: false,
},
Expand Down Expand Up @@ -1854,17 +1861,20 @@ func instancePlacementGroupCreate() *core.Command {
},
{
Name: "project",
Short: `Project ID of the placement group`,
Required: false,
Positional: false,
},
{
Name: "policy-mode",
Short: `The operating mode of the placement group`,
Required: false,
Positional: false,
EnumValues: []string{"optional", "enforced"},
},
{
Name: "policy-type",
Short: `The policy type of the placement group`,
Required: false,
Positional: false,
EnumValues: []string{"max_availability", "low_latency"},
Expand Down
8 changes: 4 additions & 4 deletions internal/namespaces/iot/v1beta1/iot_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func iotHubList() *core.Command {
Short: `Ordering of requested hub`,
Required: false,
Positional: false,
EnumValues: []string{"name_asc", "name_desc", "status_asc", "status_desc", "product_plan_asc", "product_plan_desc", "created_at_asc", "created_at_desc", "updated_at_asc", "updated_at_desc", "enabled_asc", "enabled_desc"},
EnumValues: []string{"name_asc", "name_desc", "status_asc", "status_desc", "product_plan_asc", "product_plan_desc", "created_at_asc", "created_at_desc", "updated_at_asc", "updated_at_desc"},
},
{
Name: "name",
Expand Down Expand Up @@ -456,7 +456,7 @@ func iotDeviceList() *core.Command {
Short: `Ordering of requested devices`,
Required: false,
Positional: false,
EnumValues: []string{"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", "enabled_asc", "enabled_desc", "allow_insecure_asc", "allow_insecure_desc", "last_seen_at_asc", "last_seen_at_desc"},
EnumValues: []string{"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"},
},
{
Name: "name",
Expand All @@ -472,7 +472,7 @@ func iotDeviceList() *core.Command {
},
{
Name: "enabled",
Short: `Filter on the enabled flag`,
Short: `Deprecated, ignored filter`,
Required: false,
Positional: false,
},
Expand All @@ -484,7 +484,7 @@ func iotDeviceList() *core.Command {
},
{
Name: "is-connected",
Short: `Filter on the is_connected state`,
Short: `Deprecated, ignored filter`,
Required: false,
Positional: false,
},
Expand Down

0 comments on commit 0569a57

Please sign in to comment.