Closed Laure-di closed 4 months ago
Issue come from the API response
GET https://api.scaleway.com/instance/v1/zones/fr-par-1/servers?page=1&project=d3520a52-2c75-4ba0-bda8-82dd087f07f2 Réponse de l'API : { "servers": [ { "id": "403fcad3-5526-437c-b856-789d8fd5884d", "name": "scw-great-maxwell", "arch": "x86_64", "commercial_type": "PRO2-S", "boot_type": "local", "organization": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "project": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "hostname": "scw-great-maxwell", "image": { "id": "c0c92384-4eea-45b1-8fb7-de84bbda822c", "name": "Ubuntu 22.04 Jammy Jellyfish", "organization": "51b656e3-4865-41e8-adbc-0c45bdd780db", "project": "51b656e3-4865-41e8-adbc-0c45bdd780db", "root_volume": { "id": "65adff1c-cc93-409f-b9d4-fc5411b557fd", "name": "Ubuntu 22.04 Jammy Jellyfish", "volume_type": "unified", "size": 10000000000 }, "extra_volumes": {}, "public": true, "arch": "x86_64", "creation_date": "2024-04-22T11:58:44.240830+00:00", "modification_date": "2024-04-22T11:58:44.240830+00:00", "default_bootscript": null, "from_server": "", "state": "available", "tags": [], "zone": "fr-par-1" }, "volumes": { "0": { "boot": false, "id": "ff82f40c-6424-4015-bf40-2abcb619a370", "name": "System volume", "volume_type": "b_ssd", "export_uri": null, "organization": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "project": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "server": { "id": "403fcad3-5526-437c-b856-789d8fd5884d", "name": "scw-great-maxwell" }, "size": 10000000000, "state": "available", "creation_date": "2024-06-19T09:50:17.643655+00:00", "modification_date": "2024-06-19T09:50:18.416706+00:00", "tags": [], "zone": "fr-par-1" } }, "tags": [], "state": "running", "protected": false, "state_detail": "booted", "public_ip": { "id": "e44b2fab-0688-4752-b5c5-1f38588324b1", "address": "212.47.230.198", "dynamic": false, "gateway": "62.210.0.1", "netmask": "32", "family": "inet", "provisioning_mode": "dhcp", "tags": [], "state": "attached", "ipam_id": "16826cc8-9269-4ccf-ac28-2d777d023cbc" }, "public_ips": [ { "id": "e44b2fab-0688-4752-b5c5-1f38588324b1", "address": "212.47.230.198", "dynamic": false, "gateway": "62.210.0.1", "netmask": "32", "family": "inet", "provisioning_mode": "dhcp", "tags": [], "state": "attached", "ipam_id": "16826cc8-9269-4ccf-ac28-2d777d023cbc" }, { "id": "2702e253-1191-4a85-bacb-9a3b9671f3c1", "address": "2001:bc8:710:28b9:dc00:ff:fe5b:15d5", "dynamic": false, "gateway": "fe80::dc00:ff:fe5b:15d6", "netmask": "64", "family": "inet6", "provisioning_mode": "slaac", "tags": [], "state": "attached", "ipam_id": "1bbaa6f0-f752-4842-bcec-d600115d6759" } ], "mac_address": "de:00:00:5b:15:d5", "routed_ip_enabled": true, "ipv6": null, "extra_networks": [], "dynamic_ip_required": false, "enable_ipv6": false, "private_ip": null, "creation_date": "2024-06-19T09:50:17.643655+00:00", "modification_date": "2024-06-19T09:50:22.478699+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", "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" }, "security_group": { "id": "1c1fc99f-b2de-408d-9eb0-da801a3e2744", "name": "Default security group" }, "location": { "zone_id": "par1", "platform_id": "14", "cluster_id": "58", "hypervisor_id": "801", "node_id": "26" }, "maintenances": [], "allowed_actions": [ "poweroff", "terminate", "reboot", "stop_in_place", "backup" ], "placement_group": null, "private_nics": [], "zone": "fr-par-1" } ] }
The problem stemmed from the API but has since been resolved.
Traceback (most recent call last): File "/Users/lauremasson/PycharmProjects/sdk-tests-python/instance.py", line 27, in
list = api.list_servers_all()
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lauremasson/Documents/devtools/protoc-gen/_generated/scaleway-sdk-python/scaleway/scaleway/instance/v1/api.py", line 575, in list_servers_all
return fetch_all_pages(
^^^^^^^^^^^^^^^^
File "/Users/lauremasson/PycharmProjects/data-structure/.venv/lib/python3.11/site-packages/scaleway_core/utils/fetch_all_pages.py", line 35, in fetch_all_pages
data = fetcher(fetcher_args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lauremasson/Documents/devtools/protoc-gen/_generated/scaleway-sdk-python/scaleway/scaleway/instance/v1/api.py", line 524, in list_servers
return unmarshal_ListServersResponse(res.json())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lauremasson/Documents/devtools/protoc-gen/_generated/scaleway-sdk-python/scaleway/scaleway/instance/v1/marshalling.py", line 1924, in unmarshal_ListServersResponse
args["servers"] = [unmarshal_Server(v) for v in field] if field is not None else None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lauremasson/Documents/devtools/protoc-gen/_generated/scaleway-sdk-python/scaleway/scaleway/instance/v1/marshalling.py", line 1924, in
args["servers"] = [unmarshal_Server(v) for v in field] if field is not None else None
^^^^^^^^^^^^^^^^^^^
File "/Users/lauremasson/Documents/devtools/protoc-gen/_generated/scaleway-sdk-python/scaleway/scaleway/instance/v1/marshalling.py", line 855, in unmarshal_Server
args["bootscript"] = unmarshal_Bootscript(field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lauremasson/Documents/devtools/protoc-gen/_generated/scaleway-sdk-python/scaleway/scaleway/instance/v1/marshalling.py", line 301, in unmarshal_Bootscript
return Bootscript( args)
^^^^^^^^^^^^^^^^^^
TypeError: Bootscript.init() missing 1 required positional argument: 'arch'