From dda447a1b2fe8aac3925e73c7fe111927fcb48f8 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 16 Jul 2024 12:01:35 +0000 Subject: [PATCH 1/2] feat: update generated APIs --- ...e-services-backend-stage-list-usage.golden | 1 + ...e-edge-services-pipeline-list-usage.golden | 9 +++++---- ...t-all-usage-instance-snapshot-usage.golden | 2 +- .../test-all-usage-tem-webhook-usage.golden | 2 +- .../testdata/test-all-usage-vpc-usage.golden | 1 + .../test-all-usage-vpc-vpc-usage.golden | 4 ++-- docs/commands/edge-services.md | 2 ++ docs/commands/instance.md | 2 +- docs/commands/tem.md | 4 ++-- docs/commands/vpc.md | 19 +++++++++++++++++-- go.mod | 2 +- go.sum | 4 ++-- .../v1alpha1/edge_services_cli.go | 14 ++++++++++++++ 13 files changed, 50 insertions(+), 16 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-edge-services-backend-stage-list-usage.golden b/cmd/scw/testdata/test-all-usage-edge-services-backend-stage-list-usage.golden index cd17ff54d3..49a0a785f7 100644 --- a/cmd/scw/testdata/test-all-usage-edge-services-backend-stage-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-edge-services-backend-stage-list-usage.golden @@ -11,6 +11,7 @@ ARGS: [project-id] Project ID to filter for, only backend stages from this Project will be returned [bucket-name] Bucket name to filter for, only backend stages from this Bucket will be returned [bucket-region] Bucket region to filter for, only backend stages with buckets in this region will be returned + [lb-id] Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned FLAGS: -h, --help help for list diff --git a/cmd/scw/testdata/test-all-usage-edge-services-pipeline-list-usage.golden b/cmd/scw/testdata/test-all-usage-edge-services-pipeline-list-usage.golden index cd17e92a92..57c4ea68c4 100644 --- a/cmd/scw/testdata/test-all-usage-edge-services-pipeline-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-edge-services-pipeline-list-usage.golden @@ -6,10 +6,11 @@ USAGE: scw edge-services pipeline list [arg=value ...] ARGS: - [order-by] Sort order of pipelines in the response (created_at_asc | created_at_desc | name_asc | name_desc) - [name] Pipeline name to filter for, only pipelines with this string within their name will be returned - [project-id] Project ID to filter for, only pipelines from this Project will be returned - [organization-id] Organization ID to filter for, only pipelines from this Organization will be returned + [order-by] Sort order of pipelines in the response (created_at_asc | created_at_desc | name_asc | name_desc) + [name] Pipeline name to filter for, only pipelines with this string within their name will be returned + [project-id] Project ID to filter for, only pipelines from this Project will be returned + [has-backend-stage-lb] Filter on backend stage, only pipelines with a Load Balancer origin will be returned + [organization-id] Organization ID to filter for, only pipelines from this Organization will be returned FLAGS: -h, --help help for list diff --git a/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden b/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden index ea5dd9605e..ea1daee89b 100644 --- a/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden +++ b/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden @@ -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: diff --git a/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden b/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden index 57adc29aca..108ca49eb1 100644 --- a/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden +++ b/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -A Webhook can trigger a specific event based on the email or domain resource status. +Webhooks enable real-time communication and automation between systems by sending messages through all protocols supported by SNS, such as HTTP, HTTPS, and Serverless Functions, allowing for immediate updates and actions based on specific events. USAGE: scw tem webhook diff --git a/cmd/scw/testdata/test-all-usage-vpc-usage.golden b/cmd/scw/testdata/test-all-usage-vpc-usage.golden index 7bab18eea5..dbd5ab4fa5 100644 --- a/cmd/scw/testdata/test-all-usage-vpc-usage.golden +++ b/cmd/scw/testdata/test-all-usage-vpc-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden b/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden index 46c1ae957b..cfa905b016 100644 --- a/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden +++ b/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden @@ -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: diff --git a/docs/commands/edge-services.md b/docs/commands/edge-services.md index 7770310ea6..061f42965a 100644 --- a/docs/commands/edge-services.md +++ b/docs/commands/edge-services.md @@ -128,6 +128,7 @@ scw edge-services backend-stage list [arg=value ...] | project-id | | Project ID to filter for, only backend stages from this Project will be returned | | bucket-name | | Bucket name to filter for, only backend stages from this Bucket will be returned | | bucket-region | | Bucket region to filter for, only backend stages with buckets in this region will be returned | +| lb-id | | Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned | @@ -458,6 +459,7 @@ scw edge-services pipeline list [arg=value ...] | order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Sort order of pipelines in the response | | name | | Pipeline name to filter for, only pipelines with this string within their name will be returned | | project-id | | Project ID to filter for, only pipelines from this Project will be returned | +| has-backend-stage-lb | | Filter on backend stage, only pipelines with a Load Balancer origin will be returned | | organization-id | | Organization ID to filter for, only pipelines from this Organization will be returned | diff --git a/docs/commands/instance.md b/docs/commands/instance.md index 95cc73317e..1b1502ece8 100644 --- a/docs/commands/instance.md +++ b/docs/commands/instance.md @@ -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. diff --git a/docs/commands/tem.md b/docs/commands/tem.md index 0b8040fff8..e8a825778f 100644 --- a/docs/commands/tem.md +++ b/docs/commands/tem.md @@ -288,9 +288,9 @@ scw tem email list [arg=value ...] ## Webhook management commands -A Webhook can trigger a specific event based on the email or domain resource status. +Webhooks enable real-time communication and automation between systems by sending messages through all protocols supported by SNS, such as HTTP, HTTPS, and Serverless Functions, allowing for immediate updates and actions based on specific events. -A Webhook can trigger a specific event based on the email or domain resource status. +Webhooks enable real-time communication and automation between systems by sending messages through all protocols supported by SNS, such as HTTP, HTTPS, and Serverless Functions, allowing for immediate updates and actions based on specific events. **Usage:** diff --git a/docs/commands/vpc.md b/docs/commands/vpc.md index cadb274c54..a5e52dfb96 100644 --- a/docs/commands/vpc.md +++ b/docs/commands/vpc.md @@ -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) @@ -184,6 +185,20 @@ scw vpc private-network update [arg=value ...] +## Route management command + +Custom routes. + +Custom routes. + +**Usage:** + +``` +scw vpc route +``` + + + ## Routes management command Routes management command. @@ -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. diff --git a/go.mod b/go.mod index 13375655c2..cdfc14f508 100644 --- a/go.mod +++ b/go.mod @@ -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.20240710142519-7b3cbe4364c1 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240716082911-cef39a9d4ee9 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index af8234dfbf..c39efd1641 100644 --- a/go.sum +++ b/go.sum @@ -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.20240710142519-7b3cbe4364c1 h1:VtqzoX75ODZe9Sr7l6wkTX+KOvCA9sjbanGXiyGzrPc= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29.0.20240710142519-7b3cbe4364c1/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +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/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= diff --git a/internal/namespaces/edge_services/v1alpha1/edge_services_cli.go b/internal/namespaces/edge_services/v1alpha1/edge_services_cli.go index a1656600c7..cf750e6c3f 100644 --- a/internal/namespaces/edge_services/v1alpha1/edge_services_cli.go +++ b/internal/namespaces/edge_services/v1alpha1/edge_services_cli.go @@ -150,6 +150,13 @@ func edgeServicesPipelineList() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "has-backend-stage-lb", + Short: `Filter on backend stage, only pipelines with a Load Balancer origin will be returned`, + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "organization-id", Short: `Organization ID to filter for, only pipelines from this Organization will be returned`, @@ -1049,6 +1056,13 @@ func edgeServicesBackendStageList() *core.Command { Deprecated: false, Positional: false, }, + { + Name: "lb-id", + Short: `Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned`, + Required: false, + Deprecated: false, + Positional: false, + }, }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*edge_services.ListBackendStagesRequest) From 17b91518a430f03d4151a733312f2288c73d911e Mon Sep 17 00:00:00 2001 From: Jules Casteran Date: Tue, 16 Jul 2024 17:23:21 +0200 Subject: [PATCH 2/2] gen doc and goldens --- ...t-all-usage-instance-snapshot-usage.golden | 2 +- .../test-all-usage-tem-webhook-usage.golden | 2 +- .../testdata/test-all-usage-vpc-usage.golden | 1 - .../test-all-usage-vpc-vpc-usage.golden | 4 ++-- docs/commands/instance.md | 2 +- docs/commands/tem.md | 4 ++-- docs/commands/vpc.md | 19 ++----------------- 7 files changed, 9 insertions(+), 25 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden b/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden index ea1daee89b..ea5dd9605e 100644 --- a/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden +++ b/cmd/scw/testdata/test-all-usage-instance-snapshot-usage.golden @@ -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: diff --git a/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden b/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden index 108ca49eb1..57adc29aca 100644 --- a/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden +++ b/cmd/scw/testdata/test-all-usage-tem-webhook-usage.golden @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Webhooks enable real-time communication and automation between systems by sending messages through all protocols supported by SNS, such as HTTP, HTTPS, and Serverless Functions, allowing for immediate updates and actions based on specific events. +A Webhook can trigger a specific event based on the email or domain resource status. USAGE: scw tem webhook diff --git a/cmd/scw/testdata/test-all-usage-vpc-usage.golden b/cmd/scw/testdata/test-all-usage-vpc-usage.golden index dbd5ab4fa5..7bab18eea5 100644 --- a/cmd/scw/testdata/test-all-usage-vpc-usage.golden +++ b/cmd/scw/testdata/test-all-usage-vpc-usage.golden @@ -7,7 +7,6 @@ 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 diff --git a/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden b/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden index cfa905b016..46c1ae957b 100644 --- a/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden +++ b/cmd/scw/testdata/test-all-usage-vpc-vpc-usage.golden @@ -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: diff --git a/docs/commands/instance.md b/docs/commands/instance.md index 1b1502ece8..95cc73317e 100644 --- a/docs/commands/instance.md +++ b/docs/commands/instance.md @@ -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. diff --git a/docs/commands/tem.md b/docs/commands/tem.md index e8a825778f..0b8040fff8 100644 --- a/docs/commands/tem.md +++ b/docs/commands/tem.md @@ -288,9 +288,9 @@ scw tem email list [arg=value ...] ## Webhook management commands -Webhooks enable real-time communication and automation between systems by sending messages through all protocols supported by SNS, such as HTTP, HTTPS, and Serverless Functions, allowing for immediate updates and actions based on specific events. +A Webhook can trigger a specific event based on the email or domain resource status. -Webhooks enable real-time communication and automation between systems by sending messages through all protocols supported by SNS, such as HTTP, HTTPS, and Serverless Functions, allowing for immediate updates and actions based on specific events. +A Webhook can trigger a specific event based on the email or domain resource status. **Usage:** diff --git a/docs/commands/vpc.md b/docs/commands/vpc.md index a5e52dfb96..cadb274c54 100644 --- a/docs/commands/vpc.md +++ b/docs/commands/vpc.md @@ -10,7 +10,6 @@ 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) @@ -185,20 +184,6 @@ scw vpc private-network update [arg=value ...] -## Route management command - -Custom routes. - -Custom routes. - -**Usage:** - -``` -scw vpc route -``` - - - ## Routes management command Routes management command. @@ -247,8 +232,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.