Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when unmarshalling IP with CIDR notation #468

Closed
remyleone opened this issue Jul 2, 2020 · 1 comment
Closed

Bug when unmarshalling IP with CIDR notation #468

remyleone opened this issue Jul 2, 2020 · 1 comment
Labels
rdb Managed MySQL and PostgreSQL issues, bugs and feature requests

Comments

@remyleone
Copy link
Member

Found in scaleway/scaleway-cli#1156

It seems that "0.0.0.0/0" is not a valid IP address for the scaleway sdk

$ go run ./cmd/scw/main.go rdb acl list ca6271c4-5182-4627-81c2-3d8a8542585b -D
running: [/var/folders/sm/h3cw_xsj0279j12fnhv6bzd40000gn/T/go-build626928940/b001/exe/main rdb acl list ca6271c4-5182-4627-81c2-3d8a8542585b -D]
client: using sdk version v1.0.0-beta.6+devclient: using sdk version v1.0.0-beta.6+devcreating GET request on https://api.scaleway.com/rdb/v1/regions/fr-par/instances/ca6271c4-5182-4627-81c2-3d8a8542585b/acls?page=1
--------------- Scaleway SDK REQUEST 1 : ---------------
GET /rdb/v1/regions/fr-par/instances/ca6271c4-5182-4627-81c2-3d8a8542585b/acls?page=1 HTTP/1.1
Host: api.scaleway.com
User-Agent: scaleway-sdk-go/v1.0.0-beta.6+dev (go1.14.4; darwin; amd64) scaleway-cli/2.0.0-beta.4+dev
X-Auth-Token: 11111111-1111-1111-1111-111111111111
Accept-Encoding: gzip


---------------------------------------------------------
--------------- Scaleway SDK RESPONSE 1 : ---------------
HTTP/2.0 200 OK
Content-Length: 140
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
Content-Type: application/json
Date: Thu, 02 Jul 2020 09:52:28 GMT
Server: agw_listener_public_vip
Strict-Transport-Security: max-age=63072000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: 49fbee23-7c63-4a41-8fa6-a645b373e441

{"rules":[{"ip":"0.0.0.0/0","port":8969,"protocol":"tcp","direction":"inbound","action":"allow","description":"Allow All"}],"total_count":1}
----------------------------------------------------------Scaleway-sdk-go: could not parse application/json response body: invalid IP address: 0.0.0.0/0
skipping check versiontelemetry successfully sent
exit status 1

@jerome-quere
Copy link
Contributor

fixed by #482

@remyleone remyleone added the rdb Managed MySQL and PostgreSQL issues, bugs and feature requests label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rdb Managed MySQL and PostgreSQL issues, bugs and feature requests
Projects
None yet
Development

No branches or pull requests

2 participants