exoscale / python-exoscale

Python bindings for the Exoscale APIs
https://exoscale.github.io/python-exoscale/
ISC License
15 stars 8 forks source link

Handle multiple path parameters #58

Closed thomas-chauvet closed 5 months ago

thomas-chauvet commented 5 months ago

Hello,

I noticed that the v2 part of the library does not handle multiple path parameters.

For instance when using:


c = Client(api_key, api_secret, url="https://api-ch-gva-2.exoscale.com/v2")
c.update_dbaas_pg_connection_pool(
            connection_pool_name=connection_pool_name,
            service_name=dbaas_service_name,
            database_name=connection_pool_db,
            mode=connection_pool_mode,
            size=connection_pool_number,
        )

It will raise a KeyError because only the first parameter (service_name) will be given and not the two parameters needed for this route (service_name and connection_pool_name).

I've opened a PR to fix this: https://github.com/exoscale/python-exoscale/pull/57

pierre-emmanuelJ commented 5 months ago

Thanks a lot for your contribution!

A release is upcoming: https://github.com/exoscale/python-exoscale/pull/59

I close this one since your PR has been merged