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

InstanceUtilsV1API cannot create an IP address #849

Open
rico132 opened this issue Feb 5, 2025 · 0 comments
Open

InstanceUtilsV1API cannot create an IP address #849

rico132 opened this issue Feb 5, 2025 · 0 comments
Assignees
Labels
bug Something isn't working instance Instance issues, bugs and feature requests priority:highest Bugs filled by customers, security issues

Comments

@rico132
Copy link

rico132 commented Feb 5, 2025

Hello there,

When I try to create an IP address like this:

client = Client.from_env()
api = InstanceUtilsV1API(client)
api.create_ip(type_=IpType.ROUTED_IPV6)

I get an error:

 result = api.create_ip(type_=IpType.ROUTED_IPV6)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/scaleway/instance/v1/api.py", line 3571, in create_ip
    return unmarshal_CreateIpResponse(res.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/scaleway/instance/v1/marshalling.py", line 1021, in unmarshal_CreateIpResponse
    args["ip"] = unmarshal_Ip(field)
                 ^^^^^^^^^^^^^^^^^^^
  File "/.venv/lib/python3.12/site-packages/scaleway/instance/v1/marshalling.py", line 1008, in unmarshal_Ip
    return Ip(**args)
           ^^^^^^^^^^
TypeError: Ip.__init__() missing 1 required positional argument: 'address'

So I added a print statement in scaleway/instance/v1/api.py create_ip() and the response looks something like this(I removed the UUIDs and the prefix):

{'ip': {'id': 'UUID', 'address': None, 'prefix': 'PREFIX', 'reverse': None, 'server': None, 'organization': 'UUID', 'project': 'UUID', 'zone': 'fr-par-1', 'type': 'routed_ipv6', 'state': 'detached', 'tags': [], 'ipam_id': 'UUID'}}

I think the address should not be None

@rico132 rico132 changed the title InstanceUtilsV1API cannot create a IP address InstanceUtilsV1API cannot create an IP address Feb 5, 2025
@yfodil yfodil added bug Something isn't working instance Instance issues, bugs and feature requests labels Feb 5, 2025
@remyleone remyleone added the priority:highest Bugs filled by customers, security issues label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working instance Instance issues, bugs and feature requests priority:highest Bugs filled by customers, security issues
Projects
None yet
Development

No branches or pull requests

4 participants