diff --git a/api/instance/v1/server_utils_test.go b/api/instance/v1/server_utils_test.go index 4c67d973f..c82784740 100644 --- a/api/instance/v1/server_utils_test.go +++ b/api/instance/v1/server_utils_test.go @@ -162,7 +162,7 @@ func TestAPI_CreateServer(t *testing.T) { testhelpers.AssertNoError(t, err) // this UUID might change when running the cassette later when the image "ubuntu_focal" got a new version - testhelpers.Equals(t, "1bed752e-f775-4ec2-b179-40af20ec1eec", res.Server.Image.ID) + testhelpers.Equals(t, "9c41e95b-add2-4ef8-b1b1-af8899748eda", res.Server.Image.ID) err = instanceAPI.DeleteServer(&DeleteServerRequest{ Zone: scw.ZoneFrPar1, ServerID: res.Server.ID, diff --git a/api/instance/v1/testdata/create-server.yaml b/api/instance/v1/testdata/create-server.yaml index e5d320c84..9897901cf 100644 --- a/api/instance/v1/testdata/create-server.yaml +++ b/api/instance/v1/testdata/create-server.yaml @@ -7,35 +7,21 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=created_at_asc&type=unknown_type&zone=fr-par-1 + url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=type_asc&type=unknown_type&zone=fr-par-1 method: GET response: - body: '{"local_images":[{"id":"1bed752e-f775-4ec2-b179-40af20ec1eec", "arch":"x86_64", - "zone":"fr-par-1", "compatible_commercial_types":["DEV1-L", "DEV1-M", "DEV1-S", - "DEV1-XL", "GP1-L", "GP1-M", "GP1-S", "GP1-XL", "GP1-XS", "START1-L", "START1-M", - "START1-S", "START1-XS", "VC1L", "VC1M", "VC1S", "X64-120GB", "X64-15GB", "X64-30GB", - "X64-60GB", "ENT1-XXS", "ENT1-XS", "ENT1-S", "ENT1-M", "ENT1-L", "ENT1-XL", - "ENT1-2XL", "PRO2-XXS", "PRO2-XS", "PRO2-S", "PRO2-M", "PRO2-L", "STARDUST1-S", - "PLAY2-MICRO", "PLAY2-NANO", "PLAY2-PICO", "POP2-2C-8G", "POP2-4C-16G", "POP2-8C-32G", - "POP2-16C-64G", "POP2-32C-128G", "POP2-64C-256G", "POP2-HM-2C-16G", "POP2-HM-4C-32G", - "POP2-HM-8C-64G", "POP2-HM-16C-128G", "POP2-HM-32C-256G", "POP2-HM-64C-512G", - "POP2-HC-2C-4G", "POP2-HC-4C-8G", "POP2-HC-8C-16G", "POP2-HC-16C-32G", "POP2-HC-32C-64G", - "POP2-HC-64C-128G"], "label":"ubuntu_focal", "type":"instance_local"}, {"id":"9517ef8a-b830-4880-ab30-3f2366a8a207", - "arch":"arm64", "zone":"fr-par-1", "compatible_commercial_types":["AMP2-C1", - "AMP2-C2", "AMP2-C4", "AMP2-C8", "AMP2-C12", "AMP2-C24", "AMP2-C48", "AMP2-C60", - "COPARM1-2C-8G", "COPARM1-4C-16G", "COPARM1-8C-32G", "COPARM1-16C-64G", "COPARM1-32C-128G"], - "label":"ubuntu_focal", "type":"instance_local"}], "total_count":2}' + body: '{"local_images":[{"id":"19f37e3e-d8c4-43cb-a739-7ccefec2a489","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"9c41e95b-add2-4ef8-b1b1-af8899748eda","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"1de03aca-1106-4152-bd36-f057c0cce9f1","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_sbs"},{"id":"60dd2959-89ce-4636-b54d-f1bb2ce9bde8","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_sbs"}],"total_count":4}' headers: Content-Length: - - "1260" + - "2328" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Wed, 13 Mar 2024 14:04:08 GMT + - Fri, 05 Jul 2024 09:32:10 GMT Server: - - Scaleway API Gateway (fr-par-2;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -43,12 +29,12 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 175c82ab-efe5-4bc2-9ee0-f7c27ad4dbff + - 6d100b8a-5b13-4c9e-bc11-9733c577e898 status: 200 OK code: 200 duration: "" - request: - body: '{"name":"srv-optimistic-mirzakhani","commercial_type":"GP1-XS","image":"1bed752e-f775-4ec2-b179-40af20ec1eec","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' + body: '{"name":"srv-ecstatic-saha","commercial_type":"GP1-XS","image":"9c41e95b-add2-4ef8-b1b1-af8899748eda","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' form: {} headers: Content-Type: @@ -58,27 +44,27 @@ interactions: url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers method: POST response: - body: '{"server": {"id": "6c125ef5-2567-46f9-aa8a-acbb05894cbf", "name": "srv-optimistic-mirzakhani", + body: '{"server": {"id": "973c6deb-c4c4-47e9-b9b9-62fdd812fb42", "name": "srv-ecstatic-saha", "arch": "x86_64", "commercial_type": "GP1-XS", "boot_type": "local", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "hostname": "srv-optimistic-mirzakhani", "image": {"id": "1bed752e-f775-4ec2-b179-40af20ec1eec", + "hostname": "srv-ecstatic-saha", "image": {"id": "9c41e95b-add2-4ef8-b1b1-af8899748eda", "name": "Ubuntu 20.04 Focal Fossa", "organization": "51b656e3-4865-41e8-adbc-0c45bdd780db", - "project": "51b656e3-4865-41e8-adbc-0c45bdd780db", "root_volume": {"id": "9199297e-fd35-4012-9164-8c97820f205b", + "project": "51b656e3-4865-41e8-adbc-0c45bdd780db", "root_volume": {"id": "f7bff04a-ee32-4bf5-ae53-2280e11d8977", "name": "Ubuntu 20.04 Focal Fossa", "volume_type": "unified", "size": 10000000000}, - "extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2024-02-22T15:47:31.528876+00:00", - "modification_date": "2024-02-22T15:47:31.528876+00:00", "default_bootscript": - null, "from_server": null, "state": "available", "tags": [], "zone": "fr-par-1"}, - "volumes": {"0": {"boot": false, "id": "f866b8e9-22fc-43c4-a1e0-f5ad6380bc8b", + "extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2024-07-03T19:59:39.939165+00:00", + "modification_date": "2024-07-03T19:59:39.939165+00:00", "default_bootscript": + null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"}, + "volumes": {"0": {"boot": false, "id": "36886cc7-3ef4-4cbf-9f33-7dad4a30d987", "name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri": null, "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "server": {"id": "6c125ef5-2567-46f9-aa8a-acbb05894cbf", "name": "srv-optimistic-mirzakhani"}, - "size": 150000000000, "state": "available", "creation_date": "2024-03-13T14:04:09.208979+00:00", - "modification_date": "2024-03-13T14:04:09.208979+00:00", "tags": [], "zone": + "server": {"id": "973c6deb-c4c4-47e9-b9b9-62fdd812fb42", "name": "srv-ecstatic-saha"}, + "size": 150000000000, "state": "available", "creation_date": "2024-07-05T09:32:10.284203+00:00", + "modification_date": "2024-07-05T09:32:10.284203+00:00", "tags": [], "zone": "fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail": - "", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:44:07:b9", - "routed_ip_enabled": false, "ipv6": null, "extra_networks": [], "dynamic_ip_required": - true, "enable_ipv6": false, "private_ip": null, "creation_date": "2024-03-13T14:04:09.208979+00:00", - "modification_date": "2024-03-13T14:04:09.208979+00:00", "bootscript": {"id": + "", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:5f:9a:41", + "routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required": + true, "enable_ipv6": false, "private_ip": null, "creation_date": "2024-07-05T09:32:10.284203+00:00", + "modification_date": "2024-07-05T09:32:10.284203+00:00", "bootscript": {"id": "fdfe150f-a870-4ce4-b432-9f56b5b995c1", "public": true, "title": "x86_64 mainline 4.4.230 rev1", "architecture": "x86_64", "organization": "11111111-1111-4111-8111-111111111111", "project": "11111111-1111-4111-8111-111111111111", "kernel": "http://10.194.3.9/kernel/x86_64-mainline-lts-4.4-4.4.230-rev1/vmlinuz-4.4.230", @@ -86,21 +72,21 @@ interactions: "bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16", "default": true, "zone": "fr-par-1"}, "security_group": {"id": "0fe819c3-274d-472a-b3f5-ddb258d2d8bb", "name": "Default security group"}, "location": null, "maintenances": [], "allowed_actions": - ["poweron", "backup", "enable_routed_ip"], "placement_group": null, "private_nics": - [], "zone": "fr-par-1"}}' + ["poweron", "backup"], "placement_group": null, "private_nics": [], "zone": + "fr-par-1"}}' headers: Content-Length: - - "2657" + - "2610" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Wed, 13 Mar 2024 14:04:09 GMT + - Fri, 05 Jul 2024 09:32:10 GMT Location: - - https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/6c125ef5-2567-46f9-aa8a-acbb05894cbf + - https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/973c6deb-c4c4-47e9-b9b9-62fdd812fb42 Server: - - Scaleway API Gateway (fr-par-2;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -108,7 +94,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - d7e71ed3-9be6-4ee6-9e19-5e9ee1d850bb + - 268eec6d-1c3c-4c02-80e4-1466777e1533 status: 201 Created code: 201 duration: "" @@ -118,17 +104,19 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/6c125ef5-2567-46f9-aa8a-acbb05894cbf + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/973c6deb-c4c4-47e9-b9b9-62fdd812fb42 method: DELETE response: body: "" headers: Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json Date: - - Wed, 13 Mar 2024 14:04:09 GMT + - Fri, 05 Jul 2024 09:32:10 GMT Server: - - Scaleway API Gateway (fr-par-2;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -136,7 +124,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - e73e8a6b-4c6f-4c25-becd-fe029e2a3001 + - b492939b-85ad-43ba-b34a-7ea96c4e91b5 status: 204 No Content code: 204 duration: "" diff --git a/api/instance/v1/testdata/image-wait-test.yaml b/api/instance/v1/testdata/image-wait-test.yaml index 99a9b76f7..28cc532da 100644 --- a/api/instance/v1/testdata/image-wait-test.yaml +++ b/api/instance/v1/testdata/image-wait-test.yaml @@ -7,33 +7,19 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=created_at_asc&type=unknown_type&zone=fr-par-1 + url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=type_asc&type=unknown_type&zone=fr-par-1 method: GET response: - body: '{"local_images":[{"id":"1bed752e-f775-4ec2-b179-40af20ec1eec", "arch":"x86_64", - "zone":"fr-par-1", "compatible_commercial_types":["DEV1-L", "DEV1-M", "DEV1-S", - "DEV1-XL", "GP1-L", "GP1-M", "GP1-S", "GP1-XL", "GP1-XS", "START1-L", "START1-M", - "START1-S", "START1-XS", "VC1L", "VC1M", "VC1S", "X64-120GB", "X64-15GB", "X64-30GB", - "X64-60GB", "ENT1-XXS", "ENT1-XS", "ENT1-S", "ENT1-M", "ENT1-L", "ENT1-XL", - "ENT1-2XL", "PRO2-XXS", "PRO2-XS", "PRO2-S", "PRO2-M", "PRO2-L", "STARDUST1-S", - "PLAY2-MICRO", "PLAY2-NANO", "PLAY2-PICO", "POP2-2C-8G", "POP2-4C-16G", "POP2-8C-32G", - "POP2-16C-64G", "POP2-32C-128G", "POP2-64C-256G", "POP2-HM-2C-16G", "POP2-HM-4C-32G", - "POP2-HM-8C-64G", "POP2-HM-16C-128G", "POP2-HM-32C-256G", "POP2-HM-64C-512G", - "POP2-HC-2C-4G", "POP2-HC-4C-8G", "POP2-HC-8C-16G", "POP2-HC-16C-32G", "POP2-HC-32C-64G", - "POP2-HC-64C-128G"], "label":"ubuntu_focal", "type":"instance_local"}, {"id":"9517ef8a-b830-4880-ab30-3f2366a8a207", - "arch":"arm64", "zone":"fr-par-1", "compatible_commercial_types":["AMP2-C1", - "AMP2-C2", "AMP2-C4", "AMP2-C8", "AMP2-C12", "AMP2-C24", "AMP2-C48", "AMP2-C60", - "COPARM1-2C-8G", "COPARM1-4C-16G", "COPARM1-8C-32G", "COPARM1-16C-64G", "COPARM1-32C-128G"], - "label":"ubuntu_focal", "type":"instance_local"}], "total_count":2}' + body: '{"local_images":[{"id":"19f37e3e-d8c4-43cb-a739-7ccefec2a489","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"9c41e95b-add2-4ef8-b1b1-af8899748eda","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"1de03aca-1106-4152-bd36-f057c0cce9f1","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_sbs"},{"id":"60dd2959-89ce-4636-b54d-f1bb2ce9bde8","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_sbs"}],"total_count":4}' headers: Content-Length: - - "1260" + - "2328" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:14 GMT + - Fri, 05 Jul 2024 09:33:07 GMT Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -43,12 +29,12 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 9a391945-b520-470d-86a6-2abc3096bc18 + - cffd7dda-2c89-41cc-bc25-04dd411a214f status: 200 OK code: 200 duration: "" - request: - body: '{"name":"srv-amazing-heisenberg","commercial_type":"DEV1-M","image":"1bed752e-f775-4ec2-b179-40af20ec1eec","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' + body: '{"name":"srv-competent-benz","commercial_type":"DEV1-M","image":"9c41e95b-add2-4ef8-b1b1-af8899748eda","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' form: {} headers: Content-Type: @@ -58,27 +44,27 @@ interactions: url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers method: POST response: - body: '{"server": {"id": "1b037e48-9341-4c24-87af-68121f8ca859", "name": "srv-amazing-heisenberg", + body: '{"server": {"id": "9e9c098b-8d80-4afc-bbb7-1e27fddf0702", "name": "srv-competent-benz", "arch": "x86_64", "commercial_type": "DEV1-M", "boot_type": "local", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "hostname": "srv-amazing-heisenberg", "image": {"id": "1bed752e-f775-4ec2-b179-40af20ec1eec", + "hostname": "srv-competent-benz", "image": {"id": "9c41e95b-add2-4ef8-b1b1-af8899748eda", "name": "Ubuntu 20.04 Focal Fossa", "organization": "51b656e3-4865-41e8-adbc-0c45bdd780db", - "project": "51b656e3-4865-41e8-adbc-0c45bdd780db", "root_volume": {"id": "9199297e-fd35-4012-9164-8c97820f205b", + "project": "51b656e3-4865-41e8-adbc-0c45bdd780db", "root_volume": {"id": "f7bff04a-ee32-4bf5-ae53-2280e11d8977", "name": "Ubuntu 20.04 Focal Fossa", "volume_type": "unified", "size": 10000000000}, - "extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2024-02-22T15:47:31.528876+00:00", - "modification_date": "2024-02-22T15:47:31.528876+00:00", "default_bootscript": - null, "from_server": null, "state": "available", "tags": [], "zone": "fr-par-1"}, - "volumes": {"0": {"boot": false, "id": "2008c543-2a64-42c5-8051-800af8327248", + "extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2024-07-03T19:59:39.939165+00:00", + "modification_date": "2024-07-03T19:59:39.939165+00:00", "default_bootscript": + null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"}, + "volumes": {"0": {"boot": false, "id": "e3fc3664-2f32-4946-b3b1-710b607e6f8e", "name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri": null, "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "server": {"id": "1b037e48-9341-4c24-87af-68121f8ca859", "name": "srv-amazing-heisenberg"}, - "size": 40000000000, "state": "available", "creation_date": "2024-03-14T07:30:14.609873+00:00", - "modification_date": "2024-03-14T07:30:14.609873+00:00", "tags": [], "zone": + "server": {"id": "9e9c098b-8d80-4afc-bbb7-1e27fddf0702", "name": "srv-competent-benz"}, + "size": 40000000000, "state": "available", "creation_date": "2024-07-05T09:33:07.592750+00:00", + "modification_date": "2024-07-05T09:33:07.592750+00:00", "tags": [], "zone": "fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail": - "", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:44:3f:a7", - "routed_ip_enabled": false, "ipv6": null, "extra_networks": [], "dynamic_ip_required": - true, "enable_ipv6": false, "private_ip": null, "creation_date": "2024-03-14T07:30:14.609873+00:00", - "modification_date": "2024-03-14T07:30:14.609873+00:00", "bootscript": {"id": + "", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:5f:9a:4f", + "routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required": + true, "enable_ipv6": false, "private_ip": null, "creation_date": "2024-07-05T09:33:07.592750+00:00", + "modification_date": "2024-07-05T09:33:07.592750+00:00", "bootscript": {"id": "fdfe150f-a870-4ce4-b432-9f56b5b995c1", "public": true, "title": "x86_64 mainline 4.4.230 rev1", "architecture": "x86_64", "organization": "11111111-1111-4111-8111-111111111111", "project": "11111111-1111-4111-8111-111111111111", "kernel": "http://10.194.3.9/kernel/x86_64-mainline-lts-4.4-4.4.230-rev1/vmlinuz-4.4.230", @@ -86,19 +72,19 @@ interactions: "bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16", "default": true, "zone": "fr-par-1"}, "security_group": {"id": "0fe819c3-274d-472a-b3f5-ddb258d2d8bb", "name": "Default security group"}, "location": null, "maintenances": [], "allowed_actions": - ["poweron", "backup", "enable_routed_ip"], "placement_group": null, "private_nics": - [], "zone": "fr-par-1"}}' + ["poweron", "backup"], "placement_group": null, "private_nics": [], "zone": + "fr-par-1"}}' headers: Content-Length: - - "2647" + - "2612" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:15 GMT + - Fri, 05 Jul 2024 09:33:07 GMT Location: - - https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/1b037e48-9341-4c24-87af-68121f8ca859 + - https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/9e9c098b-8d80-4afc-bbb7-1e27fddf0702 Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -108,7 +94,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - f257b6b0-3715-47d5-8fcf-961e66d2a625 + - 8cb58097-3dcc-47ce-b148-3aec9e5b45ca status: 201 Created code: 201 duration: "" @@ -120,24 +106,25 @@ interactions: - application/json User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/1b037e48-9341-4c24-87af-68121f8ca859/action + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/9e9c098b-8d80-4afc-bbb7-1e27fddf0702/action method: POST response: - body: '{"task": {"id": "79440ea7-b5e9-4600-8ac0-b5115e1cb5ca", "description": - "server_backup", "status": "success", "href_from": "/servers/1b037e48-9341-4c24-87af-68121f8ca859/action", - "href_result": "/images/81cbfbda-1c71-4e1b-bc84-e31289c023da", "started_at": - "2024-03-14T07:30:15.706979+00:00", "terminated_at": null}}' + body: '{"task": {"id": "efa1a9e5-9401-4d41-ae3a-757ec3bc133c", "description": + "server_backup", "status": "pending", "href_from": "/servers/9e9c098b-8d80-4afc-bbb7-1e27fddf0702/action", + "href_result": "/images/e173c28d-aec1-42fc-b62d-e5fab00a00eb", "started_at": + "2024-07-05T09:33:08.468008+00:00", "terminated_at": null, "progress": 0, "zone": + "par1"}}' headers: Content-Length: - - "314" + - "345" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:15 GMT + - Fri, 05 Jul 2024 09:33:08 GMT Location: - - https://api.scaleway.com/instance/v1/zones/fr-par-1/tasks/79440ea7-b5e9-4600-8ac0-b5115e1cb5ca + - https://api.scaleway.com/instance/v1/zones/fr-par-1/tasks/efa1a9e5-9401-4d41-ae3a-757ec3bc133c Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -147,7 +134,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 41ff6946-bc96-422d-9818-e1dbcd9ec284 + - efa60d84-af94-4e1c-9cce-c45d10b82d1a status: 202 Accepted code: 202 duration: "" @@ -157,21 +144,21 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/images/81cbfbda-1c71-4e1b-bc84-e31289c023da + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/images/e173c28d-aec1-42fc-b62d-e5fab00a00eb method: GET response: - body: '{"image": {"id": "81cbfbda-1c71-4e1b-bc84-e31289c023da", "name": "backup", + body: '{"image": {"id": "e173c28d-aec1-42fc-b62d-e5fab00a00eb", "name": "backup", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "root_volume": {"id": "4199cfde-61f1-4451-bc9e-9c56db8ca8b5", "name": "backup_snap_0", + "root_volume": {"id": "034bbb0d-ee3f-40ac-ac12-1c5aab7f6eb5", "name": "backup_snap_0", "volume_type": "l_ssd", "size": 40000000000}, "extra_volumes": {}, "public": - false, "arch": "x86_64", "creation_date": "2024-03-14T07:30:15.229652+00:00", - "modification_date": "2024-03-14T07:30:15.229652+00:00", "default_bootscript": + false, "arch": "x86_64", "creation_date": "2024-07-05T09:33:07.973802+00:00", + "modification_date": "2024-07-05T09:33:07.973802+00:00", "default_bootscript": {"id": "fdfe150f-a870-4ce4-b432-9f56b5b995c1", "public": true, "title": "x86_64 mainline 4.4.230 rev1", "architecture": "x86_64", "organization": "11111111-1111-4111-8111-111111111111", "project": "11111111-1111-4111-8111-111111111111", "kernel": "http://10.194.3.9/kernel/x86_64-mainline-lts-4.4-4.4.230-rev1/vmlinuz-4.4.230", "dtb": "", "initrd": "http://10.194.3.9/initrd/initrd-Linux-x86_64-v3.14.6.gz", "bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16", "default": - true, "zone": "fr-par-1"}, "from_server": "1b037e48-9341-4c24-87af-68121f8ca859", + true, "zone": "fr-par-1"}, "from_server": "9e9c098b-8d80-4afc-bbb7-1e27fddf0702", "state": "available", "tags": [], "zone": "fr-par-1"}}' headers: Content-Length: @@ -181,7 +168,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:16 GMT + - Fri, 05 Jul 2024 09:33:08 GMT Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -191,7 +178,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 858dc697-d059-4da6-bbb2-d3b7a7af32d0 + - f62af5ef-9c4c-41a9-905e-9c030c7174f7 status: 200 OK code: 200 duration: "" @@ -201,21 +188,21 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/images/81cbfbda-1c71-4e1b-bc84-e31289c023da + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/images/e173c28d-aec1-42fc-b62d-e5fab00a00eb method: GET response: - body: '{"image": {"id": "81cbfbda-1c71-4e1b-bc84-e31289c023da", "name": "backup", + body: '{"image": {"id": "e173c28d-aec1-42fc-b62d-e5fab00a00eb", "name": "backup", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "root_volume": {"id": "4199cfde-61f1-4451-bc9e-9c56db8ca8b5", "name": "backup_snap_0", + "root_volume": {"id": "034bbb0d-ee3f-40ac-ac12-1c5aab7f6eb5", "name": "backup_snap_0", "volume_type": "l_ssd", "size": 40000000000}, "extra_volumes": {}, "public": - false, "arch": "x86_64", "creation_date": "2024-03-14T07:30:15.229652+00:00", - "modification_date": "2024-03-14T07:30:15.229652+00:00", "default_bootscript": + false, "arch": "x86_64", "creation_date": "2024-07-05T09:33:07.973802+00:00", + "modification_date": "2024-07-05T09:33:07.973802+00:00", "default_bootscript": {"id": "fdfe150f-a870-4ce4-b432-9f56b5b995c1", "public": true, "title": "x86_64 mainline 4.4.230 rev1", "architecture": "x86_64", "organization": "11111111-1111-4111-8111-111111111111", "project": "11111111-1111-4111-8111-111111111111", "kernel": "http://10.194.3.9/kernel/x86_64-mainline-lts-4.4-4.4.230-rev1/vmlinuz-4.4.230", "dtb": "", "initrd": "http://10.194.3.9/initrd/initrd-Linux-x86_64-v3.14.6.gz", "bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16", "default": - true, "zone": "fr-par-1"}, "from_server": "1b037e48-9341-4c24-87af-68121f8ca859", + true, "zone": "fr-par-1"}, "from_server": "9e9c098b-8d80-4afc-bbb7-1e27fddf0702", "state": "available", "tags": [], "zone": "fr-par-1"}}' headers: Content-Length: @@ -225,7 +212,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:16 GMT + - Fri, 05 Jul 2024 09:33:08 GMT Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -235,7 +222,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 6ee51ed8-7b1c-4791-bd8b-db9339e794b0 + - 41582a6d-5393-48a7-9ac3-120d02a1a6a2 status: 200 OK code: 200 duration: "" @@ -245,15 +232,17 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/1b037e48-9341-4c24-87af-68121f8ca859 + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/9e9c098b-8d80-4afc-bbb7-1e27fddf0702 method: DELETE response: body: "" headers: Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json Date: - - Thu, 14 Mar 2024 07:30:16 GMT + - Fri, 05 Jul 2024 09:33:08 GMT Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -263,7 +252,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 65f9b840-dd11-4004-b898-8256c2e87c90 + - 8428d86b-c728-4f4c-8a6a-b14248fda287 status: 204 No Content code: 204 duration: "" @@ -273,15 +262,17 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes/2008c543-2a64-42c5-8051-800af8327248 + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes/e3fc3664-2f32-4946-b3b1-710b607e6f8e method: DELETE response: body: "" headers: Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json Date: - - Thu, 14 Mar 2024 07:30:16 GMT + - Fri, 05 Jul 2024 09:33:08 GMT Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -291,7 +282,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 29df40f9-2378-439e-a80a-a858b5925901 + - 977a13f9-a575-4cac-b4c3-109fed067231 status: 204 No Content code: 204 duration: "" @@ -301,15 +292,17 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/images/81cbfbda-1c71-4e1b-bc84-e31289c023da + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/images/e173c28d-aec1-42fc-b62d-e5fab00a00eb method: DELETE response: body: "" headers: Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json Date: - - Thu, 14 Mar 2024 07:30:16 GMT + - Fri, 05 Jul 2024 09:33:08 GMT Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -319,7 +312,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 0eb71a3a-8e8c-425e-a6f7-cf581917b24c + - fc52484b-c312-44e2-8174-cf9f3d57cdf6 status: 204 No Content code: 204 duration: "" @@ -329,15 +322,17 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/4199cfde-61f1-4451-bc9e-9c56db8ca8b5 + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/034bbb0d-ee3f-40ac-ac12-1c5aab7f6eb5 method: DELETE response: body: "" headers: Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json Date: - - Thu, 14 Mar 2024 07:30:16 GMT + - Fri, 05 Jul 2024 09:33:09 GMT Server: - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: @@ -347,7 +342,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 73183606-37ea-4356-b9a3-7a87c831a544 + - a18d0bbe-95a3-4a7c-8ceb-c049f05790a6 status: 204 No Content code: 204 duration: "" diff --git a/api/instance/v1/testdata/snapshot-wait-test.yaml b/api/instance/v1/testdata/snapshot-wait-test.yaml index d409ad086..3f8403527 100644 --- a/api/instance/v1/testdata/snapshot-wait-test.yaml +++ b/api/instance/v1/testdata/snapshot-wait-test.yaml @@ -7,35 +7,21 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=created_at_asc&type=unknown_type&zone=fr-par-1 + url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=type_asc&type=unknown_type&zone=fr-par-1 method: GET response: - body: '{"local_images":[{"id":"1bed752e-f775-4ec2-b179-40af20ec1eec", "arch":"x86_64", - "zone":"fr-par-1", "compatible_commercial_types":["DEV1-L", "DEV1-M", "DEV1-S", - "DEV1-XL", "GP1-L", "GP1-M", "GP1-S", "GP1-XL", "GP1-XS", "START1-L", "START1-M", - "START1-S", "START1-XS", "VC1L", "VC1M", "VC1S", "X64-120GB", "X64-15GB", "X64-30GB", - "X64-60GB", "ENT1-XXS", "ENT1-XS", "ENT1-S", "ENT1-M", "ENT1-L", "ENT1-XL", - "ENT1-2XL", "PRO2-XXS", "PRO2-XS", "PRO2-S", "PRO2-M", "PRO2-L", "STARDUST1-S", - "PLAY2-MICRO", "PLAY2-NANO", "PLAY2-PICO", "POP2-2C-8G", "POP2-4C-16G", "POP2-8C-32G", - "POP2-16C-64G", "POP2-32C-128G", "POP2-64C-256G", "POP2-HM-2C-16G", "POP2-HM-4C-32G", - "POP2-HM-8C-64G", "POP2-HM-16C-128G", "POP2-HM-32C-256G", "POP2-HM-64C-512G", - "POP2-HC-2C-4G", "POP2-HC-4C-8G", "POP2-HC-8C-16G", "POP2-HC-16C-32G", "POP2-HC-32C-64G", - "POP2-HC-64C-128G"], "label":"ubuntu_focal", "type":"instance_local"}, {"id":"9517ef8a-b830-4880-ab30-3f2366a8a207", - "arch":"arm64", "zone":"fr-par-1", "compatible_commercial_types":["AMP2-C1", - "AMP2-C2", "AMP2-C4", "AMP2-C8", "AMP2-C12", "AMP2-C24", "AMP2-C48", "AMP2-C60", - "COPARM1-2C-8G", "COPARM1-4C-16G", "COPARM1-8C-32G", "COPARM1-16C-64G", "COPARM1-32C-128G"], - "label":"ubuntu_focal", "type":"instance_local"}], "total_count":2}' + body: '{"local_images":[{"id":"19f37e3e-d8c4-43cb-a739-7ccefec2a489","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"9c41e95b-add2-4ef8-b1b1-af8899748eda","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"1de03aca-1106-4152-bd36-f057c0cce9f1","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_sbs"},{"id":"60dd2959-89ce-4636-b54d-f1bb2ce9bde8","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_sbs"}],"total_count":4}' headers: Content-Length: - - "1260" + - "2328" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:31 GMT + - Fri, 05 Jul 2024 09:33:13 GMT Server: - - Scaleway API Gateway (fr-par-3;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -43,12 +29,12 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 88cd350e-a7e0-4807-bd2c-3dca140616b4 + - 4727e0d7-4267-4acd-abc4-136d95ad9667 status: 200 OK code: 200 duration: "" - request: - body: '{"name":"srv-nice-raman","commercial_type":"DEV1-M","image":"1bed752e-f775-4ec2-b179-40af20ec1eec","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' + body: '{"name":"srv-infallible-joliot","commercial_type":"DEV1-M","image":"9c41e95b-add2-4ef8-b1b1-af8899748eda","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' form: {} headers: Content-Type: @@ -58,27 +44,27 @@ interactions: url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers method: POST response: - body: '{"server": {"id": "c89cee7c-26de-4d35-9b4a-24e5bb3f268e", "name": "srv-nice-raman", + body: '{"server": {"id": "f8b691c4-1e71-4144-9eb5-aa3c8092ef0e", "name": "srv-infallible-joliot", "arch": "x86_64", "commercial_type": "DEV1-M", "boot_type": "local", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "hostname": "srv-nice-raman", "image": {"id": "1bed752e-f775-4ec2-b179-40af20ec1eec", + "hostname": "srv-infallible-joliot", "image": {"id": "9c41e95b-add2-4ef8-b1b1-af8899748eda", "name": "Ubuntu 20.04 Focal Fossa", "organization": "51b656e3-4865-41e8-adbc-0c45bdd780db", - "project": "51b656e3-4865-41e8-adbc-0c45bdd780db", "root_volume": {"id": "9199297e-fd35-4012-9164-8c97820f205b", + "project": "51b656e3-4865-41e8-adbc-0c45bdd780db", "root_volume": {"id": "f7bff04a-ee32-4bf5-ae53-2280e11d8977", "name": "Ubuntu 20.04 Focal Fossa", "volume_type": "unified", "size": 10000000000}, - "extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2024-02-22T15:47:31.528876+00:00", - "modification_date": "2024-02-22T15:47:31.528876+00:00", "default_bootscript": - null, "from_server": null, "state": "available", "tags": [], "zone": "fr-par-1"}, - "volumes": {"0": {"boot": false, "id": "c3eb85b8-794e-4777-8081-9c1fb57f67d8", + "extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2024-07-03T19:59:39.939165+00:00", + "modification_date": "2024-07-03T19:59:39.939165+00:00", "default_bootscript": + null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1"}, + "volumes": {"0": {"boot": false, "id": "bc8ca225-0f0d-48af-8aa3-ef6a5cd4392a", "name": "Ubuntu 20.04 Focal Fossa", "volume_type": "l_ssd", "export_uri": null, "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", - "server": {"id": "c89cee7c-26de-4d35-9b4a-24e5bb3f268e", "name": "srv-nice-raman"}, - "size": 40000000000, "state": "available", "creation_date": "2024-03-14T07:30:32.295970+00:00", - "modification_date": "2024-03-14T07:30:32.295970+00:00", "tags": [], "zone": + "server": {"id": "f8b691c4-1e71-4144-9eb5-aa3c8092ef0e", "name": "srv-infallible-joliot"}, + "size": 40000000000, "state": "available", "creation_date": "2024-07-05T09:33:13.654985+00:00", + "modification_date": "2024-07-05T09:33:13.654985+00:00", "tags": [], "zone": "fr-par-1"}}, "tags": [], "state": "stopped", "protected": false, "state_detail": - "", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:44:3f:ad", - "routed_ip_enabled": false, "ipv6": null, "extra_networks": [], "dynamic_ip_required": - true, "enable_ipv6": false, "private_ip": null, "creation_date": "2024-03-14T07:30:32.295970+00:00", - "modification_date": "2024-03-14T07:30:32.295970+00:00", "bootscript": {"id": + "", "public_ip": null, "public_ips": [], "mac_address": "de:00:00:5f:9a:55", + "routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required": + true, "enable_ipv6": false, "private_ip": null, "creation_date": "2024-07-05T09:33:13.654985+00:00", + "modification_date": "2024-07-05T09:33:13.654985+00:00", "bootscript": {"id": "fdfe150f-a870-4ce4-b432-9f56b5b995c1", "public": true, "title": "x86_64 mainline 4.4.230 rev1", "architecture": "x86_64", "organization": "11111111-1111-4111-8111-111111111111", "project": "11111111-1111-4111-8111-111111111111", "kernel": "http://10.194.3.9/kernel/x86_64-mainline-lts-4.4-4.4.230-rev1/vmlinuz-4.4.230", @@ -86,21 +72,21 @@ interactions: "bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16", "default": true, "zone": "fr-par-1"}, "security_group": {"id": "0fe819c3-274d-472a-b3f5-ddb258d2d8bb", "name": "Default security group"}, "location": null, "maintenances": [], "allowed_actions": - ["poweron", "backup", "enable_routed_ip"], "placement_group": null, "private_nics": - [], "zone": "fr-par-1"}}' + ["poweron", "backup"], "placement_group": null, "private_nics": [], "zone": + "fr-par-1"}}' headers: Content-Length: - - "2623" + - "2621" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:32 GMT + - Fri, 05 Jul 2024 09:33:13 GMT Location: - - https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/c89cee7c-26de-4d35-9b4a-24e5bb3f268e + - https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/f8b691c4-1e71-4144-9eb5-aa3c8092ef0e Server: - - Scaleway API Gateway (fr-par-3;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -108,12 +94,12 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 00ca7da1-c7cf-43a8-89d8-caca38d32da7 + - 74160d89-5c0a-4b55-b44a-2bc945f56a48 status: 201 Created code: 201 duration: "" - request: - body: '{"name":"backup","volume_id":"c3eb85b8-794e-4777-8081-9c1fb57f67d8","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' + body: '{"name":"backup","volume_id":"bc8ca225-0f0d-48af-8aa3-ef6a5cd4392a","project":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b"}' form: {} headers: Content-Type: @@ -123,27 +109,27 @@ interactions: url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots method: POST response: - body: '{"snapshot": {"id": "42c6da23-b65c-4010-8fa4-7f38613d061b", "name": "backup", - "volume_type": "l_ssd", "creation_date": "2024-03-14T07:30:32.872810+00:00", - "modification_date": "2024-03-14T07:30:32.872810+00:00", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", + body: '{"snapshot": {"id": "0d4bf5bd-8bb0-4d8e-b652-c34b4d3ad299", "name": "backup", + "volume_type": "l_ssd", "creation_date": "2024-07-05T09:33:14.277625+00:00", + "modification_date": "2024-07-05T09:33:14.277625+00:00", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "size": 40000000000, "state": - "available", "base_volume": {"id": "c3eb85b8-794e-4777-8081-9c1fb57f67d8", "name": + "available", "base_volume": {"id": "bc8ca225-0f0d-48af-8aa3-ef6a5cd4392a", "name": "Ubuntu 20.04 Focal Fossa"}, "tags": [], "zone": "fr-par-1", "error_details": - null}, "task": {"id": "2875a5db-dcbe-4eaa-b099-f70b206526ff", "description": - "snapshot_42c6da23-b65c-4010-8fa4-7f38613d061b", "status": "pending", "href_from": - "/snapshots", "href_result": "snapshots/42c6da23-b65c-4010-8fa4-7f38613d061b", - "started_at": "2024-03-14T07:30:33.078128+00:00", "terminated_at": null}}' + null}, "task": {"id": "debc7e1f-5ed3-499d-b24a-689def64f4d9", "description": + "volume_cold_snapshot", "status": "success", "href_from": "/snapshots", "href_result": + "snapshots/0d4bf5bd-8bb0-4d8e-b652-c34b4d3ad299", "started_at": "2024-07-05T09:33:14.562021+00:00", + "terminated_at": null, "progress": 100, "zone": "par1"}}' headers: Content-Length: - - "822" + - "830" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:33 GMT + - Fri, 05 Jul 2024 09:33:14 GMT Server: - - Scaleway API Gateway (fr-par-3;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -151,7 +137,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 970e2175-4751-4b38-839c-a0824fe1b72d + - 48b4f67d-c8e2-4513-9439-fe15831bec92 status: 201 Created code: 201 duration: "" @@ -161,14 +147,14 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/42c6da23-b65c-4010-8fa4-7f38613d061b + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/0d4bf5bd-8bb0-4d8e-b652-c34b4d3ad299 method: GET response: - body: '{"snapshot": {"id": "42c6da23-b65c-4010-8fa4-7f38613d061b", "name": "backup", - "volume_type": "l_ssd", "creation_date": "2024-03-14T07:30:32.872810+00:00", - "modification_date": "2024-03-14T07:30:32.872810+00:00", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", + body: '{"snapshot": {"id": "0d4bf5bd-8bb0-4d8e-b652-c34b4d3ad299", "name": "backup", + "volume_type": "l_ssd", "creation_date": "2024-07-05T09:33:14.277625+00:00", + "modification_date": "2024-07-05T09:33:14.277625+00:00", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "size": 40000000000, "state": - "available", "base_volume": {"id": "c3eb85b8-794e-4777-8081-9c1fb57f67d8", "name": + "available", "base_volume": {"id": "bc8ca225-0f0d-48af-8aa3-ef6a5cd4392a", "name": "Ubuntu 20.04 Focal Fossa"}, "tags": [], "zone": "fr-par-1", "error_details": null}}' headers: @@ -179,9 +165,9 @@ interactions: Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:33 GMT + - Fri, 05 Jul 2024 09:33:14 GMT Server: - - Scaleway API Gateway (fr-par-3;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -189,7 +175,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 03d3c2ff-70c8-4c03-9820-ebd1a1120662 + - e1f732b5-df54-4c54-b470-eb867ae42dc9 status: 200 OK code: 200 duration: "" @@ -199,14 +185,14 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/42c6da23-b65c-4010-8fa4-7f38613d061b + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/0d4bf5bd-8bb0-4d8e-b652-c34b4d3ad299 method: GET response: - body: '{"snapshot": {"id": "42c6da23-b65c-4010-8fa4-7f38613d061b", "name": "backup", - "volume_type": "l_ssd", "creation_date": "2024-03-14T07:30:32.872810+00:00", - "modification_date": "2024-03-14T07:30:32.872810+00:00", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", + body: '{"snapshot": {"id": "0d4bf5bd-8bb0-4d8e-b652-c34b4d3ad299", "name": "backup", + "volume_type": "l_ssd", "creation_date": "2024-07-05T09:33:14.277625+00:00", + "modification_date": "2024-07-05T09:33:14.277625+00:00", "organization": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "project": "ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b", "size": 40000000000, "state": - "available", "base_volume": {"id": "c3eb85b8-794e-4777-8081-9c1fb57f67d8", "name": + "available", "base_volume": {"id": "bc8ca225-0f0d-48af-8aa3-ef6a5cd4392a", "name": "Ubuntu 20.04 Focal Fossa"}, "tags": [], "zone": "fr-par-1", "error_details": null}}' headers: @@ -217,9 +203,9 @@ interactions: Content-Type: - application/json Date: - - Thu, 14 Mar 2024 07:30:33 GMT + - Fri, 05 Jul 2024 09:33:14 GMT Server: - - Scaleway API Gateway (fr-par-3;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -227,7 +213,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 3a2bdca8-17c9-4ffa-a2ed-cf2303923ca1 + - 2f2d0ed5-d47e-4d65-a421-7380ba01406d status: 200 OK code: 200 duration: "" @@ -237,17 +223,19 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/c89cee7c-26de-4d35-9b4a-24e5bb3f268e + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/f8b691c4-1e71-4144-9eb5-aa3c8092ef0e method: DELETE response: body: "" headers: Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json Date: - - Thu, 14 Mar 2024 07:30:33 GMT + - Fri, 05 Jul 2024 09:33:15 GMT Server: - - Scaleway API Gateway (fr-par-3;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -255,7 +243,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - b4bf8c87-a520-4a17-aaf1-e87ebe1fa912 + - b83a4804-f98a-45eb-be2c-197356dca1a9 status: 204 No Content code: 204 duration: "" @@ -265,17 +253,19 @@ interactions: headers: User-Agent: - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) - url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/42c6da23-b65c-4010-8fa4-7f38613d061b + url: https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/0d4bf5bd-8bb0-4d8e-b652-c34b4d3ad299 method: DELETE response: body: "" headers: Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json Date: - - Thu, 14 Mar 2024 07:30:33 GMT + - Fri, 05 Jul 2024 09:33:14 GMT Server: - - Scaleway API Gateway (fr-par-3;edge01) + - Scaleway API Gateway (fr-par-3;edge02) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -283,7 +273,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - a3158142-67f4-4d83-addb-428fe340b513 + - bcc50102-4db7-407c-aa9d-dde76dbe740e status: 204 No Content code: 204 duration: "" diff --git a/api/marketplace/v2/marketplace_sdk.go b/api/marketplace/v2/marketplace_sdk.go index 087241d51..cfd44fbd7 100644 --- a/api/marketplace/v2/marketplace_sdk.go +++ b/api/marketplace/v2/marketplace_sdk.go @@ -87,6 +87,8 @@ func (enum *ListImagesRequestOrderBy) UnmarshalJSON(data []byte) error { type ListLocalImagesRequestOrderBy string const ( + ListLocalImagesRequestOrderByTypeAsc = ListLocalImagesRequestOrderBy("type_asc") + ListLocalImagesRequestOrderByTypeDesc = ListLocalImagesRequestOrderBy("type_desc") ListLocalImagesRequestOrderByCreatedAtAsc = ListLocalImagesRequestOrderBy("created_at_asc") ListLocalImagesRequestOrderByCreatedAtDesc = ListLocalImagesRequestOrderBy("created_at_desc") ) @@ -94,13 +96,15 @@ const ( func (enum ListLocalImagesRequestOrderBy) String() string { if enum == "" { // return default value if empty - return "created_at_asc" + return "type_asc" } return string(enum) } func (enum ListLocalImagesRequestOrderBy) Values() []ListLocalImagesRequestOrderBy { return []ListLocalImagesRequestOrderBy{ + "type_asc", + "type_desc", "created_at_asc", "created_at_desc", } @@ -393,7 +397,7 @@ type ListLocalImagesRequest struct { Page *int32 `json:"-"` - // OrderBy: default value: created_at_asc + // OrderBy: default value: type_asc OrderBy ListLocalImagesRequestOrderBy `json:"-"` // Precisely one of ImageID, VersionID, ImageLabel must be set. diff --git a/api/marketplace/v2/marketplace_utils_test.go b/api/marketplace/v2/marketplace_utils_test.go index 0b2e493ec..48d5ed29b 100644 --- a/api/marketplace/v2/marketplace_utils_test.go +++ b/api/marketplace/v2/marketplace_utils_test.go @@ -27,7 +27,7 @@ func TestGetImageByLabel(t *testing.T) { testhelpers.AssertNoError(t, err) // ubuntu_focal DEV1-S at par1: 68cf470e-6c35-4741-bbff-4ce788616461 - testhelpers.Equals(t, "68cf470e-6c35-4741-bbff-4ce788616461", image.ID) + testhelpers.Equals(t, "9c41e95b-add2-4ef8-b1b1-af8899748eda", image.ID) }) t.Run("matching input for GetLocalImageIDByLabel with lowercase image label", func(t *testing.T) { @@ -41,8 +41,8 @@ func TestGetImageByLabel(t *testing.T) { }) testhelpers.AssertNoError(t, err) - // ubuntu_focal DEV1-S at par1: 68cf470e-6c35-4741-bbff-4ce788616461 - testhelpers.Equals(t, "68cf470e-6c35-4741-bbff-4ce788616461", image.ID) + // ubuntu_focal DEV1-S at par1: 9c41e95b-add2-4ef8-b1b1-af8899748eda + testhelpers.Equals(t, "9c41e95b-add2-4ef8-b1b1-af8899748eda", image.ID) }) t.Run("non-matching label for GetLocalImageIDByLabel", func(t *testing.T) { diff --git a/api/marketplace/v2/testdata/go-vcr.yaml b/api/marketplace/v2/testdata/go-vcr.yaml index 357ce3f5a..391060f66 100644 --- a/api/marketplace/v2/testdata/go-vcr.yaml +++ b/api/marketplace/v2/testdata/go-vcr.yaml @@ -6,35 +6,22 @@ interactions: form: {} headers: User-Agent: - - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) - url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=created_at_asc&type=unknown_type&zone=fr-par-1 + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) + url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=type_asc&type=unknown_type&zone=fr-par-1 method: GET response: - body: '{"local_images":[{"id":"2fedb0c7-1686-4529-8344-be9e198e4dd2", "arch":"arm64", - "zone":"fr-par-1", "compatible_commercial_types":["AMP2-C1", "AMP2-C2", "AMP2-C4", - "AMP2-C8", "AMP2-C12", "AMP2-C24", "AMP2-C48", "AMP2-C60"], "label":"ubuntu_focal"}, - {"id":"68cf470e-6c35-4741-bbff-4ce788616461", "arch":"x86_64", "zone":"fr-par-1", - "compatible_commercial_types":["DEV1-L", "DEV1-M", "DEV1-S", "DEV1-XL", "GP1-L", - "GP1-M", "GP1-S", "GP1-XL", "GP1-XS", "START1-L", "START1-M", "START1-S", "START1-XS", - "VC1L", "VC1M", "VC1S", "X64-120GB", "X64-15GB", "X64-30GB", "X64-60GB", "ENT1-XXS", - "ENT1-XS", "ENT1-S", "ENT1-M", "ENT1-L", "ENT1-XL", "ENT1-2XL", "PRO2-XXS", - "PRO2-XS", "PRO2-S", "PRO2-M", "PRO2-L", "STARDUST1-S", "PLAY2-MICRO", "PLAY2-NANO", - "PLAY2-PICO", "POP2-2C-8G", "POP2-4C-16G", "POP2-8C-32G", "POP2-16C-64G", "POP2-32C-128G", - "POP2-64C-256G", "POP2-HM-2C-16G", "POP2-HM-4C-32G", "POP2-HM-8C-64G", "POP2-HM-16C-128G", - "POP2-HM-32C-256G", "POP2-HM-64C-512G", "POP2-HC-2C-4G", "POP2-HC-4C-8G", "POP2-HC-8C-16G", - "POP2-HC-16C-32G", "POP2-HC-32C-64G", "POP2-HC-64C-128G"], "label":"ubuntu_focal"}], - "total_count":2}' + body: '{"local_images":[{"id":"19f37e3e-d8c4-43cb-a739-7ccefec2a489","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"9c41e95b-add2-4ef8-b1b1-af8899748eda","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"1de03aca-1106-4152-bd36-f057c0cce9f1","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_sbs"},{"id":"60dd2959-89ce-4636-b54d-f1bb2ce9bde8","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_sbs"}],"total_count":4}' headers: Content-Length: - - "1118" + - "2328" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Tue, 27 Jun 2023 16:13:38 GMT + - Fri, 05 Jul 2024 09:25:02 GMT Server: - - Scaleway API-Gateway + - Scaleway API Gateway (fr-par-3;edge01) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -42,7 +29,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - c2b145ac-de80-4e34-a74c-3282af6d4ac3 + - 4e0ba02d-289f-4fb8-bb6d-42a1cf6e3f20 status: 200 OK code: 200 duration: "" @@ -51,35 +38,22 @@ interactions: form: {} headers: User-Agent: - - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) - url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=created_at_asc&type=unknown_type&zone=fr-par-1 + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) + url: https://api.scaleway.com/marketplace/v2/local-images?image_label=ubuntu_focal&order_by=type_asc&type=unknown_type&zone=fr-par-1 method: GET response: - body: '{"local_images":[{"id":"2fedb0c7-1686-4529-8344-be9e198e4dd2", "arch":"arm64", - "zone":"fr-par-1", "compatible_commercial_types":["AMP2-C1", "AMP2-C2", "AMP2-C4", - "AMP2-C8", "AMP2-C12", "AMP2-C24", "AMP2-C48", "AMP2-C60"], "label":"ubuntu_focal"}, - {"id":"68cf470e-6c35-4741-bbff-4ce788616461", "arch":"x86_64", "zone":"fr-par-1", - "compatible_commercial_types":["DEV1-L", "DEV1-M", "DEV1-S", "DEV1-XL", "GP1-L", - "GP1-M", "GP1-S", "GP1-XL", "GP1-XS", "START1-L", "START1-M", "START1-S", "START1-XS", - "VC1L", "VC1M", "VC1S", "X64-120GB", "X64-15GB", "X64-30GB", "X64-60GB", "ENT1-XXS", - "ENT1-XS", "ENT1-S", "ENT1-M", "ENT1-L", "ENT1-XL", "ENT1-2XL", "PRO2-XXS", - "PRO2-XS", "PRO2-S", "PRO2-M", "PRO2-L", "STARDUST1-S", "PLAY2-MICRO", "PLAY2-NANO", - "PLAY2-PICO", "POP2-2C-8G", "POP2-4C-16G", "POP2-8C-32G", "POP2-16C-64G", "POP2-32C-128G", - "POP2-64C-256G", "POP2-HM-2C-16G", "POP2-HM-4C-32G", "POP2-HM-8C-64G", "POP2-HM-16C-128G", - "POP2-HM-32C-256G", "POP2-HM-64C-512G", "POP2-HC-2C-4G", "POP2-HC-4C-8G", "POP2-HC-8C-16G", - "POP2-HC-16C-32G", "POP2-HC-32C-64G", "POP2-HC-64C-128G"], "label":"ubuntu_focal"}], - "total_count":2}' + body: '{"local_images":[{"id":"19f37e3e-d8c4-43cb-a739-7ccefec2a489","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"9c41e95b-add2-4ef8-b1b1-af8899748eda","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_local"},{"id":"1de03aca-1106-4152-bd36-f057c0cce9f1","arch":"arm64","zone":"fr-par-1","compatible_commercial_types":["AMP2-C1","AMP2-C2","AMP2-C4","AMP2-C8","AMP2-C12","AMP2-C24","AMP2-C48","AMP2-C60","COPARM1-2C-8G","COPARM1-4C-16G","COPARM1-8C-32G","COPARM1-16C-64G","COPARM1-32C-128G"],"label":"ubuntu_focal","type":"instance_sbs"},{"id":"60dd2959-89ce-4636-b54d-f1bb2ce9bde8","arch":"x86_64","zone":"fr-par-1","compatible_commercial_types":["DEV1-L","DEV1-M","DEV1-S","DEV1-XL","GP1-L","GP1-M","GP1-S","GP1-XL","GP1-XS","START1-L","START1-M","START1-S","START1-XS","VC1L","VC1M","VC1S","X64-120GB","X64-15GB","X64-30GB","X64-60GB","ENT1-XXS","ENT1-XS","ENT1-S","ENT1-M","ENT1-L","ENT1-XL","ENT1-2XL","PRO2-XXS","PRO2-XS","PRO2-S","PRO2-M","PRO2-L","STARDUST1-S","PLAY2-MICRO","PLAY2-NANO","PLAY2-PICO","POP2-2C-8G","POP2-4C-16G","POP2-8C-32G","POP2-16C-64G","POP2-32C-128G","POP2-64C-256G","POP2-HM-2C-16G","POP2-HM-4C-32G","POP2-HM-8C-64G","POP2-HM-16C-128G","POP2-HM-32C-256G","POP2-HM-64C-512G","POP2-HC-2C-4G","POP2-HC-4C-8G","POP2-HC-8C-16G","POP2-HC-16C-32G","POP2-HC-32C-64G","POP2-HC-64C-128G"],"label":"ubuntu_focal","type":"instance_sbs"}],"total_count":4}' headers: Content-Length: - - "1118" + - "2328" Content-Security-Policy: - default-src 'none'; frame-ancestors 'none' Content-Type: - application/json Date: - - Tue, 27 Jun 2023 16:13:38 GMT + - Fri, 05 Jul 2024 09:25:02 GMT Server: - - Scaleway API-Gateway + - Scaleway API Gateway (fr-par-3;edge01) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -87,7 +61,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - ab9603eb-e0f3-44ee-be8a-c1ce93b16b5c + - e1436a38-a25d-4c68-93b7-879108cf308f status: 200 OK code: 200 duration: "" @@ -96,8 +70,8 @@ interactions: form: {} headers: User-Agent: - - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.1; linux; amd64) - url: https://api.scaleway.com/marketplace/v2/local-images?image_label=foo-bar-image&order_by=created_at_asc&type=unknown_type&zone=fr-par-1 + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) + url: https://api.scaleway.com/marketplace/v2/local-images?image_label=foo-bar-image&order_by=type_asc&type=unknown_type&zone=fr-par-1 method: GET response: body: '{"message":"Not found","resource":"MarketplaceImage","resource_id":"foo-bar-image","type":"not_found"}' @@ -109,9 +83,9 @@ interactions: Content-Type: - application/json Date: - - Tue, 27 Jun 2023 16:13:38 GMT + - Fri, 05 Jul 2024 09:25:02 GMT Server: - - Scaleway API-Gateway + - Scaleway API Gateway (fr-par-3;edge01) Strict-Transport-Security: - max-age=63072000 X-Content-Type-Options: @@ -119,7 +93,7 @@ interactions: X-Frame-Options: - DENY X-Request-Id: - - 9929f165-243c-42f2-b5b8-c9b08497d6c9 + - f27c88fc-7cb7-4030-86be-3683efef5aaa status: 404 Not Found code: 404 duration: ""