scaleway / scaleway-cli

Command Line Interface for Scaleway

Home Page:https://www.scaleway.com/en/cli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

regression on scw create with multiple volumes

moul opened this issue · comments

v1.3.0

$ scw -D create --bootscript=rescue --volume=5G --env="AUTHORIZED_KEY=coucou" --name=coucou 1GB
DEBU[0000] POST https://api.scaleway.com/volumes payload={"name":"5G","size":5000000000,"volume_type":"l_ssd","organization":"00000000-0000-1000-0000-000000000000"}
DEBU[0000] POST https://api.scaleway.com/volumes payload={"name":"1GB","size":1000000000,"volume_type":"l_ssd","organization":"00000000-0000-1000-0000-000000000000"}
DEBU[0001] POST https://api.scaleway.com/servers payload={"name":"coucou","volumes":{"0":"11111111-1111-1111-1111-111111111111","1":"22222222-2222-1222-2222-222222222222"},"bootscript":"33333333-3333-1333-3333-333333333333","tags":["AUTHORIZED_KEY=coucou"],"organization":"00000000-0000-1000-0000-000000000000"}
44444444-4444-1444-4444-444444444444

v1.4.0

scw -D create --bootscript=rescue --volume=5G --env="AUTHORIZED_KEY=coucou" --name=coucou 1GB
DEBU[0000] curl -X POST -d "{\"name\":\"1GB\",\"size\":1000000000,\"volume_type\":\"l_ssd\",\"organization\":\"00000000-0000-1000-0000-000000000000\"}" -H "X-Auth-Token: 00000000-0000-0000-0000-000000000000" -H "Content-Type: application/json" https://api.scaleway.com/volumes
DEBU[0001] curl -X POST -d "{\"name\":\"coucou\",\"volumes\":{\"0\":\"11111111-1111-1111-1111-111111111111\"},\"dynamic_ip_required\":true,\"bootscript\":\"22222222-2222-1222-2222-222222222222\",\"organization\":\"00000000-0000-1000-0000-000000000000\"}" -H "X-Auth-Token: 00000000-0000-0000-0000-000000000000" -H "Content-Type: application/json" https://api.scaleway.com/servers
33333333-3333-1333-3333-333333333333

Fixed, now we need to add a unit test for this