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

Fix rpn-v2 unmarshalling #4009

Open
remyleone opened this issue Jul 25, 2024 · 1 comment
Open

Fix rpn-v2 unmarshalling #4009

remyleone opened this issue Jul 25, 2024 · 1 comment
Assignees
Labels
dedibox Dedibox issues, bugs and feature requests enhancement priority:high New features

Comments

@remyleone
Copy link
Member

$ scw dedibox rpn-v2 list-members group-id=6294 type=server --debug
running: [scw dedibox rpn-v2 list-members group-id=6294 type=server --debug]
client: using request loggerclient: using sdk version v1.0.0-beta.7+devclient: using request loggerclient: using sdk version v1.0.0-beta.7+devclient: using request loggerclient: using sdk version v1.0.0-beta.7+devcreating GET request on https://api.scaleway.com/dedibox/v1/rpnv2/groups/6294/members?order_by=created_at_asc&page=1&type=server
--------------- Scaleway SDK REQUEST 1 : ---------------
GET /dedibox/v1/rpnv2/groups/6294/members?order_by=created_at_asc&page=1&type=server HTTP/1.1
Host: api.scaleway.com
User-Agent: scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.4; darwin; arm64) scaleway-cli/2.32.1
X-Auth-Token: a42116b4-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Accept-Encoding: gzip


---------------------------------------------------------
--------------- Scaleway SDK RESPONSE 1 : ---------------
HTTP/2.0 200 OK
Connection: close
Cache-Control: max-age=0, must-revalidate, private
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
Content-Type: application/json
Date: Thu, 25 Jul 2024 16:09:28 GMT
Expires: Thu, 25 Jul 2024 16:09:28 GMT
Server: Scaleway API Gateway (fr-par-1;edge03)
Strict-Transport-Security: max-age=63072000
X-Backend-Conn: 10.42.7.54:20511
X-Backend-Name: phoenix2
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: b73f3f20-8102-49a7-8a32-f7c64accd7c2

{"total_count":2,"members":[{"id":31900,"status":"active","vlan":2002,"server":{"id":153621,"datacenter_name":"AMS1","organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42","project_id":"951df375-e094-4d26-97c1-ba548eeb9c42","hostname":"foobar-v1-v2","rebooted_at":"2024-07-25T15:50:44+00:00","created_at":"2024-07-25T15:07:46+00:00","updated_at":"2024-07-25T15:15:04+00:00","expired_at":null,"offer_id":28477,"offer_name":"Start-2-M-SSD","status":"ready","os_id":470,"interfaces":[{"device_id":1,"card_id":991104,"mac":"0c:c4:7a:0e:dc:8a","type":"normal","ips":[{"ip_id":735044,"address":"51.15.25.178","reverse":"51-15-25-178.rev.poneytelecom.eu.","version":"ipv4","cidr":24,"netmask":"255.255.255.0","semantic":"public","gateway":"51.15.25.1","status":"ready"}]},{"device_id":2,"card_id":991106,"mac":"0c:c4:7a:0e:dc:8b","type":"normal","ips":[{"ip_id":777957,"address":"10.95.246.226","reverse":null,"version":"ipv4","cidr":26,"netmask":"255.255.255.192","semantic":"private","gateway":"10.95.246.193","status":"ready"}]}],"zone":"nl-ams-1","level":{"offer_id":768,"level":"basic"},"tags":[],"is_outsourced":false,"qinq":false,"rpn_version":2},"speed":100},{"id":31901,"status":"active","vlan":2002,"server":{"id":153624,"datacenter_name":"AMS1","organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42","project_id":"951df375-e094-4d26-97c1-ba548eeb9c42","hostname":"sd-153624.dedibox.fr","rebooted_at":"2024-07-01T00:41:13+00:00","created_at":"2024-07-25T15:57:00+00:00","updated_at":"2024-07-25T16:00:07+00:00","expired_at":null,"offer_id":28477,"offer_name":"Start-2-M-SSD","status":"ready","os_id":null,"interfaces":[{"device_id":1,"card_id":991113,"mac":"0c:c4:7a:0e:dc:1c","type":"normal","ips":[{"ip_id":735047,"address":"51.15.25.181","reverse":"51-15-25-181.rev.poneytelecom.eu.","version":"ipv4","cidr":24,"netmask":"255.255.255.0","semantic":"public","gateway":"51.15.25.1","status":"ready"},{"ip_id":972695,"address":"2001:0bc8:6010:020b:0ec4:7aff:fe0e:dc1c","reverse":"2001:0bc8:6010:020b:0ec4:7aff:fe0e:dc1c.rev.poneytelecom.eu.","version":"ipv6","cidr":64,"netmask":"ffff:ffff:ffff:ffff:0000:0000:0000:0000","semantic":"public","gateway":null,"status":"ready"}]},{"device_id":2,"card_id":991115,"mac":"0c:c4:7a:0e:dc:1d","type":"normal","ips":[{"ip_id":777960,"address":"10.95.246.229","reverse":null,"version":"ipv4","cidr":26,"netmask":"255.255.255.192","semantic":"private","gateway":"10.95.246.193","status":"ready"}]}],"zone":"nl-ams-1","level":{"offer_id":768,"level":"basic"},"tags":[],"is_outsourced":false,"qinq":false,"rpn_version":2},"speed":100}]}
----------------------------------------------------------scaleway-sdk-go: could not parse application/json response body: json: cannot unmarshal number into Go struct field RpnV2Member.members.vlan of type string
@remyleone remyleone added enhancement priority:high New features dedibox Dedibox issues, bugs and feature requests labels Jul 25, 2024
@Laure-di
Copy link
Contributor

Laure-di commented Aug 1, 2024

The API return an int but it's a declare as a string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dedibox Dedibox issues, bugs and feature requests enhancement priority:high New features
Projects
None yet
Development

No branches or pull requests

2 participants