Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ have one Instance with a volume containing the OS and another one
containing the application data, and you want to use different
snapshot strategies on both volumes.

A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`).
A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`).
Volumes can be created from snapshots of their own type.

USAGE:
Expand Down
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-vpc-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ USAGE:

AVAILABLE COMMANDS:
private-network Private network management command
route Route management command
routes Routes management command
subnet Subnet management command
vpc VPC management command
Expand Down
4 changes: 2 additions & 2 deletions cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
A Virtual Private Cloud (VPC) allows you to group your regional
Private Networks together. Note that a Private Network can be a
A Virtual Private Cloud (VPC) allows you to group your regional
Private Networks together. Note that a Private Network can be a
part of only one VPC.

USAGE:
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2409,7 +2409,7 @@ have one Instance with a volume containing the OS and another one
containing the application data, and you want to use different
snapshot strategies on both volumes.

A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`).
A snapshot's volume type is its original volume's type (`l_ssd` or `b_ssd`).
Volumes can be created from snapshots of their own type.


Expand Down
19 changes: 17 additions & 2 deletions docs/commands/vpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This API allows you to manage your Virtual Private Clouds (VPCs) and Private Net
- [List Private Networks](#list-private-networks)
- [Migrate Private Networks from zoned to regional](#migrate-private-networks-from-zoned-to-regional)
- [Update Private Network](#update-private-network)
- [Route management command](#route-management-command)
- [Routes management command](#routes-management-command)
- [Return routes with associated next hop data](#return-routes-with-associated-next-hop-data)
- [Subnet management command](#subnet-management-command)
Expand Down Expand Up @@ -184,6 +185,20 @@ scw vpc private-network update <private-network-id ...> [arg=value ...]



## Route management command

Custom routes.

Custom routes.

**Usage:**

```
scw vpc route
```



## Routes management command

Routes management command.
Expand Down Expand Up @@ -232,8 +247,8 @@ scw vpc subnet

## VPC management command

A Virtual Private Cloud (VPC) allows you to group your regional
Private Networks together. Note that a Private Network can be a
A Virtual Private Cloud (VPC) allows you to group your regional
Private Networks together. Note that a Private Network can be a
part of only one VPC.


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240716082911-cef39a9d4ee9
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240716150037-245ae1bc782b
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240716082911-cef39a9d4ee9 h1:Zo++qIasET8Dt4xwpmOt4EVgjVo/NhhZgttQfDP7VSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240716082911-cef39a9d4ee9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240716150037-245ae1bc782b h1:IxVLh1ZW1irNcW79Dzmffle0rJ9Vs9gqQz+FUbAZnCQ=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240716150037-245ae1bc782b/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
38 changes: 38 additions & 0 deletions internal/namespaces/cockpit/v1/cockpit_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func GetGeneratedCommands() *core.Commands {
cockpitDataSourceGet(),
cockpitDataSourceDelete(),
cockpitDataSourceList(),
cockpitDataSourceUpdate(),
cockpitUsageOverviewGet(),
cockpitTokenCreate(),
cockpitTokenList(),
Expand Down Expand Up @@ -684,6 +685,43 @@ You can list data sources by Project, type and origin.`,
}
}

func cockpitDataSourceUpdate() *core.Command {
return &core.Command{
Short: `Update a data source`,
Long: `Update a given data source name, specified by the data source ID.`,
Namespace: "cockpit",
Resource: "data-source",
Verb: "update",
// Deprecated: false,
ArgsType: reflect.TypeOf(cockpit.RegionalAPIUpdateDataSourceRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "data-source-id",
Short: `ID of the data source to update`,
Required: true,
Deprecated: false,
Positional: false,
},
{
Name: "name",
Short: `Updated name of the data source`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
request := args.(*cockpit.RegionalAPIUpdateDataSourceRequest)

client := core.ExtractClient(ctx)
api := cockpit.NewRegionalAPI(client)
return api.UpdateDataSource(request)

},
}
}

func cockpitUsageOverviewGet() *core.Command {
return &core.Command{
Short: `Get data source usage overview`,
Expand Down
2 changes: 1 addition & 1 deletion internal/namespaces/instance/v1/instance_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ have one Instance with a volume containing the OS and another one
containing the application data, and you want to use different
snapshot strategies on both volumes.

A snapshot's volume type is its original volume's type (` + "`" + `l_ssd` + "`" + ` or ` + "`" + `b_ssd` + "`" + `).
A snapshot's volume type is its original volume's type (` + "`" + `l_ssd` + "`" + ` or ` + "`" + `b_ssd` + "`" + `).
Volumes can be created from snapshots of their own type.`,
Namespace: "instance",
Resource: "snapshot",
Expand Down
14 changes: 12 additions & 2 deletions internal/namespaces/vpc/v2/vpc_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func GetGeneratedCommands() *core.Commands {
vpcVpc(),
vpcPrivateNetwork(),
vpcSubnet(),
vpcRoute(),
vpcRoutes(),
vpcVpcList(),
vpcVpcCreate(),
Expand Down Expand Up @@ -50,8 +51,8 @@ func vpcRoot() *core.Command {
func vpcVpc() *core.Command {
return &core.Command{
Short: `VPC management command`,
Long: `A Virtual Private Cloud (VPC) allows you to group your regional
Private Networks together. Note that a Private Network can be a
Long: `A Virtual Private Cloud (VPC) allows you to group your regional
Private Networks together. Note that a Private Network can be a
part of only one VPC.`,
Namespace: "vpc",
Resource: "vpc",
Expand Down Expand Up @@ -79,6 +80,15 @@ func vpcSubnet() *core.Command {
}
}

func vpcRoute() *core.Command {
return &core.Command{
Short: `Route management command`,
Long: `Custom routes.`,
Namespace: "vpc",
Resource: "route",
}
}

func vpcRoutes() *core.Command {
return &core.Command{
Short: `Routes management command`,
Expand Down
Loading