From 4ec6f4fc685fdde30908d485c33844ba77b8f93a Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Mon, 12 May 2025 15:11:22 +0000 Subject: [PATCH 1/2] feat: update generated APIs --- .../test-all-usage-ipam-ip-list-usage.golden | 4 ++-- ...st-all-usage-keymanager-key-create-usage.golden | 2 ++ ...t-all-usage-keymanager-key-decrypt-usage.golden | 2 +- ...t-all-usage-keymanager-key-encrypt-usage.golden | 2 +- .../test-all-usage-lb-route-create-usage.golden | 1 + .../test-all-usage-lb-route-update-usage.golden | 1 + docs/commands/ipam.md | 4 ++-- docs/commands/keymanager.md | 6 ++++-- docs/commands/lb.md | 2 ++ go.mod | 2 +- go.sum | 4 ++-- internal/namespaces/file/v1alpha1/file_cli.go | 14 ++++++-------- 12 files changed, 25 insertions(+), 19 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden b/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden index f515966571..8525afb4e2 100644 --- a/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden @@ -16,8 +16,8 @@ ARGS: [resource-name] Attached resource name to filter for, only IPs attached to a resource with this string within their name will be returned. [resource-id] Resource ID to filter for. Only IPs attached to this resource will be returned [resource-ids.{index}] Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned - [resource-type] Resource type to filter for. Only IPs attached to this type of resource will be returned (unknown_type | custom | instance_server | instance_ip | instance_private_nic | lb_server | fip_ip | vpc_gateway | vpc_gateway_network | k8s_node | k8s_cluster | rdb_instance | redis_cluster | baremetal_server | baremetal_private_nic | llm_deployment | mgdb_instance | apple_silicon_server | apple_silicon_private_nic | serverless_container | serverless_function | vpn_gateway) - [resource-types.{index}] Resource types to filter for. Only IPs attached to these types of resources will be returned (unknown_type | custom | instance_server | instance_ip | instance_private_nic | lb_server | fip_ip | vpc_gateway | vpc_gateway_network | k8s_node | k8s_cluster | rdb_instance | redis_cluster | baremetal_server | baremetal_private_nic | llm_deployment | mgdb_instance | apple_silicon_server | apple_silicon_private_nic | serverless_container | serverless_function | vpn_gateway) + [resource-type] Resource type to filter for. Only IPs attached to this type of resource will be returned (unknown_type | custom | instance_server | instance_ip | instance_private_nic | lb_server | fip_ip | vpc_gateway | vpc_gateway_network | k8s_node | k8s_cluster | rdb_instance | redis_cluster | baremetal_server | baremetal_private_nic | llm_deployment | mgdb_instance | apple_silicon_server | apple_silicon_private_nic | serverless_container | serverless_function | vpn_gateway | ddl_datalab) + [resource-types.{index}] Resource types to filter for. Only IPs attached to these types of resources will be returned (unknown_type | custom | instance_server | instance_ip | instance_private_nic | lb_server | fip_ip | vpc_gateway | vpc_gateway_network | k8s_node | k8s_cluster | rdb_instance | redis_cluster | baremetal_server | baremetal_private_nic | llm_deployment | mgdb_instance | apple_silicon_server | apple_silicon_private_nic | serverless_container | serverless_function | vpn_gateway | ddl_datalab) [mac-address] MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned [tags.{index}] Tags to filter for, only IPs with one or more matching tags will be returned [is-ipv6] Defines whether to filter only for IPv4s or IPv6s diff --git a/cmd/scw/testdata/test-all-usage-keymanager-key-create-usage.golden b/cmd/scw/testdata/test-all-usage-keymanager-key-create-usage.golden index 29d821cf6e..5f3df55931 100644 --- a/cmd/scw/testdata/test-all-usage-keymanager-key-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-keymanager-key-create-usage.golden @@ -9,6 +9,8 @@ ARGS: [project-id] Project ID to use. If none is passed the default project ID will be used [name] (Optional) Name of the key [usage.symmetric-encryption] Algorithm used to encrypt and decrypt arbitrary payloads. (unknown_symmetric_encryption | aes_256_gcm) + [usage.asymmetric-encryption] (unknown_asymmetric_encryption | rsa_oaep_2048_sha256 | rsa_oaep_3072_sha256 | rsa_oaep_4096_sha256) + [usage.asymmetric-signing] (unknown_asymmetric_signing | ec_p256_sha256 | ec_p384_sha384 | rsa_pss_2048_sha256 | rsa_pss_3072_sha256 | rsa_pss_4096_sha256 | rsa_pkcs1_2048_sha256 | rsa_pkcs1_3072_sha256 | rsa_pkcs1_4096_sha256) [description] (Optional) Description of the key [tags.{index}] (Optional) List of the key's tags [rotation-policy.rotation-period] Rotation period diff --git a/cmd/scw/testdata/test-all-usage-keymanager-key-decrypt-usage.golden b/cmd/scw/testdata/test-all-usage-keymanager-key-decrypt-usage.golden index 981a4dc048..5df3c3b03a 100644 --- a/cmd/scw/testdata/test-all-usage-keymanager-key-decrypt-usage.golden +++ b/cmd/scw/testdata/test-all-usage-keymanager-key-decrypt-usage.golden @@ -6,7 +6,7 @@ USAGE: scw keymanager key decrypt [arg=value ...] ARGS: - key-id ID of the key to decrypt + key-id ID of the key to decrypt with ciphertext Base64 Ciphertext data to decrypt (Support file loading with @/path/to/file) [associated-data] (Optional) Additional authenticated data [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) diff --git a/cmd/scw/testdata/test-all-usage-keymanager-key-encrypt-usage.golden b/cmd/scw/testdata/test-all-usage-keymanager-key-encrypt-usage.golden index 4619021d71..a4cb374caf 100644 --- a/cmd/scw/testdata/test-all-usage-keymanager-key-encrypt-usage.golden +++ b/cmd/scw/testdata/test-all-usage-keymanager-key-encrypt-usage.golden @@ -6,7 +6,7 @@ USAGE: scw keymanager key encrypt [arg=value ...] ARGS: - key-id ID of the key to encrypt + key-id ID of the key to use for encryption plaintext Base64 Plaintext data to encrypt (Support file loading with @/path/to/file) [associated-data] (Optional) Additional authenticated data [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) diff --git a/cmd/scw/testdata/test-all-usage-lb-route-create-usage.golden b/cmd/scw/testdata/test-all-usage-lb-route-create-usage.golden index cd667f2690..fe538c6c80 100644 --- a/cmd/scw/testdata/test-all-usage-lb-route-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lb-route-create-usage.golden @@ -11,6 +11,7 @@ ARGS: [match.sni] Server Name Indication (SNI) value to match [match.host-header] HTTP host header to match [match.match-subdomains] If true, all subdomains will match + [match.path-begin] Path begin value to match [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-lb-route-update-usage.golden b/cmd/scw/testdata/test-all-usage-lb-route-update-usage.golden index e9bd1c1e89..8bc7b4c601 100644 --- a/cmd/scw/testdata/test-all-usage-lb-route-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lb-route-update-usage.golden @@ -11,6 +11,7 @@ ARGS: [match.sni] Server Name Indication (SNI) value to match [match.host-header] HTTP host header to match [match.match-subdomains] If true, all subdomains will match + [match.path-begin] Path begin value to match [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3) FLAGS: diff --git a/docs/commands/ipam.md b/docs/commands/ipam.md index b1697bdf93..b5c693d3b8 100644 --- a/docs/commands/ipam.md +++ b/docs/commands/ipam.md @@ -110,8 +110,8 @@ scw ipam ip list [arg=value ...] | resource-name | | Attached resource name to filter for, only IPs attached to a resource with this string within their name will be returned. | | resource-id | | Resource ID to filter for. Only IPs attached to this resource will be returned | | resource-ids.{index} | | Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned | -| resource-type | One of: `unknown_type`, `custom`, `instance_server`, `instance_ip`, `instance_private_nic`, `lb_server`, `fip_ip`, `vpc_gateway`, `vpc_gateway_network`, `k8s_node`, `k8s_cluster`, `rdb_instance`, `redis_cluster`, `baremetal_server`, `baremetal_private_nic`, `llm_deployment`, `mgdb_instance`, `apple_silicon_server`, `apple_silicon_private_nic`, `serverless_container`, `serverless_function`, `vpn_gateway` | Resource type to filter for. Only IPs attached to this type of resource will be returned | -| resource-types.{index} | One of: `unknown_type`, `custom`, `instance_server`, `instance_ip`, `instance_private_nic`, `lb_server`, `fip_ip`, `vpc_gateway`, `vpc_gateway_network`, `k8s_node`, `k8s_cluster`, `rdb_instance`, `redis_cluster`, `baremetal_server`, `baremetal_private_nic`, `llm_deployment`, `mgdb_instance`, `apple_silicon_server`, `apple_silicon_private_nic`, `serverless_container`, `serverless_function`, `vpn_gateway` | Resource types to filter for. Only IPs attached to these types of resources will be returned | +| resource-type | One of: `unknown_type`, `custom`, `instance_server`, `instance_ip`, `instance_private_nic`, `lb_server`, `fip_ip`, `vpc_gateway`, `vpc_gateway_network`, `k8s_node`, `k8s_cluster`, `rdb_instance`, `redis_cluster`, `baremetal_server`, `baremetal_private_nic`, `llm_deployment`, `mgdb_instance`, `apple_silicon_server`, `apple_silicon_private_nic`, `serverless_container`, `serverless_function`, `vpn_gateway`, `ddl_datalab` | Resource type to filter for. Only IPs attached to this type of resource will be returned | +| resource-types.{index} | One of: `unknown_type`, `custom`, `instance_server`, `instance_ip`, `instance_private_nic`, `lb_server`, `fip_ip`, `vpc_gateway`, `vpc_gateway_network`, `k8s_node`, `k8s_cluster`, `rdb_instance`, `redis_cluster`, `baremetal_server`, `baremetal_private_nic`, `llm_deployment`, `mgdb_instance`, `apple_silicon_server`, `apple_silicon_private_nic`, `serverless_container`, `serverless_function`, `vpn_gateway`, `ddl_datalab` | Resource types to filter for. Only IPs attached to these types of resources will be returned | | mac-address | | MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned | | tags.{index} | | Tags to filter for, only IPs with one or more matching tags will be returned | | is-ipv6 | | Defines whether to filter only for IPv4s or IPv6s | diff --git a/docs/commands/keymanager.md b/docs/commands/keymanager.md index b24738459a..065298345b 100644 --- a/docs/commands/keymanager.md +++ b/docs/commands/keymanager.md @@ -43,6 +43,8 @@ scw keymanager key create [arg=value ...] | project-id | | Project ID to use. If none is passed the default project ID will be used | | name | | (Optional) Name of the key | | usage.symmetric-encryption | One of: `unknown_symmetric_encryption`, `aes_256_gcm` | Algorithm used to encrypt and decrypt arbitrary payloads. | +| usage.asymmetric-encryption | One of: `unknown_asymmetric_encryption`, `rsa_oaep_2048_sha256`, `rsa_oaep_3072_sha256`, `rsa_oaep_4096_sha256` | | +| usage.asymmetric-signing | One of: `unknown_asymmetric_signing`, `ec_p256_sha256`, `ec_p384_sha384`, `rsa_pss_2048_sha256`, `rsa_pss_3072_sha256`, `rsa_pss_4096_sha256`, `rsa_pkcs1_2048_sha256`, `rsa_pkcs1_3072_sha256`, `rsa_pkcs1_4096_sha256` | | | description | | (Optional) Description of the key | | tags.{index} | | (Optional) List of the key's tags | | rotation-policy.rotation-period | | Rotation period | @@ -68,7 +70,7 @@ scw keymanager key decrypt [arg=value ...] | Name | | Description | |------|---|-------------| -| key-id | Required | ID of the key to decrypt | +| key-id | Required | ID of the key to decrypt with | | ciphertext | Required | Base64 Ciphertext data to decrypt | | associated-data | | (Optional) Additional authenticated data | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | @@ -170,7 +172,7 @@ scw keymanager key encrypt [arg=value ...] | Name | | Description | |------|---|-------------| -| key-id | Required | ID of the key to encrypt | +| key-id | Required | ID of the key to use for encryption | | plaintext | Required | Base64 Plaintext data to encrypt | | associated-data | | (Optional) Additional authenticated data | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/docs/commands/lb.md b/docs/commands/lb.md index fb5f38460f..b88f4e2a35 100644 --- a/docs/commands/lb.md +++ b/docs/commands/lb.md @@ -1204,6 +1204,7 @@ scw lb route create [arg=value ...] | match.sni | | Server Name Indication (SNI) value to match | | match.host-header | | HTTP host header to match | | match.match-subdomains | | If true, all subdomains will match | +| match.path-begin | | Path begin value to match | | zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config | @@ -1289,6 +1290,7 @@ scw lb route update [arg=value ...] | match.sni | | Server Name Indication (SNI) value to match | | match.host-header | | HTTP host header to match | | match.match-subdomains | | If true, all subdomains will match | +| match.path-begin | | Path begin value to match | | zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config | diff --git a/go.mod b/go.mod index 23fde25992..40f2fa3185 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,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.33.0.20250502141405-03137c13354a + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250507151153-c2221170c9cc github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 diff --git a/go.sum b/go.sum index 8368590e21..f7f7b6db21 100644 --- a/go.sum +++ b/go.sum @@ -466,8 +466,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.33.0.20250502141405-03137c13354a h1:vvx3QoLsyeqQKdV/rxf7Cp3BoA2kxUabjFp8pZ2JMoM= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250502141405-03137c13354a/go.mod h1:w4o02EHpO0CBGy2nehzWRaFQKd62G9HIf+Q07PDaUcE= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250507151153-c2221170c9cc h1:BG7CJh8I2AuyMP0ie6sOqAGYn5jifL4piKBZCva9C5M= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250507151153-c2221170c9cc/go.mod h1:qiGzapFyNPFwBBLJ+hTFykKSnU95n1zL64+o1ubmwf0= 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/file/v1alpha1/file_cli.go b/internal/namespaces/file/v1alpha1/file_cli.go index e5b4d6546b..09801228da 100644 --- a/internal/namespaces/file/v1alpha1/file_cli.go +++ b/internal/namespaces/file/v1alpha1/file_cli.go @@ -8,7 +8,7 @@ import ( "reflect" "github.com/scaleway/scaleway-cli/v2/core" - file "github.com/scaleway/scaleway-sdk-go/api/file/v1alpha1" + "github.com/scaleway/scaleway-sdk-go/api/file/v1alpha1" "github.com/scaleway/scaleway-sdk-go/scw" ) @@ -89,9 +89,8 @@ func fileFilesystemGet() *core.Command { func fileFilesystemList() *core.Command { return &core.Command{ - Short: `List all filesystems`, - Long: `Retrieve all filesystems in the specified region. Results are ordered by creation date in ascending order by default. -Use the order_by parameter to modify the sorting behavior.`, + Short: `List all filesystems`, + Long: `Retrieve all filesystems in the specified region. By default, the filesystems listed are ordered by creation date in ascending order. This can be modified using the ` + "`" + `order_by` + "`" + ` field.`, Namespace: "file", Resource: "filesystem", Verb: "list", @@ -120,7 +119,7 @@ Use the order_by parameter to modify the sorting behavior.`, }, { Name: "name", - Short: `Filter the return filesystems by their names`, + Short: `Filter the returned filesystems by their names`, Required: false, Deprecated: false, Positional: false, @@ -161,8 +160,7 @@ func fileAttachmentList() *core.Command { return &core.Command{ Short: `List filesystems attachments`, Long: `List all existing attachments in a specified region. -By default, the attachments listed are ordered by creation date in ascending order. -This can be modified using the ` + "`" + `order_by` + "`" + ` field.`, +By default, the attachments listed are ordered by creation date in ascending order. This can be modified using the ` + "`" + `order_by` + "`" + ` field.`, Namespace: "file", Resource: "attachment", Verb: "list", @@ -229,7 +227,7 @@ This can be modified using the ` + "`" + `order_by` + "`" + ` field.`, func fileFilesystemCreate() *core.Command { return &core.Command{ Short: `Create a new filesystem`, - Long: `To create a new filesystem, you need to provide a name, a size, and a project ID.`, + Long: `To create a new filesystem, you must specify a name, a size, and a project ID.`, Namespace: "file", Resource: "filesystem", Verb: "create", From a0db995492ae402887cbde96e31be421859ce002 Mon Sep 17 00:00:00 2001 From: Laure-di Date: Wed, 14 May 2025 10:15:17 +0200 Subject: [PATCH 2/2] fix goimport --- internal/namespaces/file/v1alpha1/file_cli.go | 2 +- internal/namespaces/key_manager/v1alpha1/key_manager_cli.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/namespaces/file/v1alpha1/file_cli.go b/internal/namespaces/file/v1alpha1/file_cli.go index 09801228da..83c59387c9 100644 --- a/internal/namespaces/file/v1alpha1/file_cli.go +++ b/internal/namespaces/file/v1alpha1/file_cli.go @@ -8,7 +8,7 @@ import ( "reflect" "github.com/scaleway/scaleway-cli/v2/core" - "github.com/scaleway/scaleway-sdk-go/api/file/v1alpha1" + file "github.com/scaleway/scaleway-sdk-go/api/file/v1alpha1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/internal/namespaces/key_manager/v1alpha1/key_manager_cli.go b/internal/namespaces/key_manager/v1alpha1/key_manager_cli.go index d0809b9251..e97845dcd2 100644 --- a/internal/namespaces/key_manager/v1alpha1/key_manager_cli.go +++ b/internal/namespaces/key_manager/v1alpha1/key_manager_cli.go @@ -8,7 +8,7 @@ import ( "reflect" "github.com/scaleway/scaleway-cli/v2/core" - "github.com/scaleway/scaleway-sdk-go/api/key_manager/v1alpha1" + key_manager "github.com/scaleway/scaleway-sdk-go/api/key_manager/v1alpha1" "github.com/scaleway/scaleway-sdk-go/scw" )