ovh / python-ovh

Thin wrapper around OVH's APIs. Handles all the hard work including credential creation and requests signing.
https://pypi.org/project/ovh/
Other
278 stars 76 forks source link

Documentation and API bug for dedicated servers #61

Closed fpoyer closed 6 years ago

fpoyer commented 6 years ago

Hi! Sorry, this is not strictly speaking a python-ovh related issue, but I found it using the client and don't know how to contact the server-side developpers... feel free to transfer the issue to whomever is better qualified to handle it.

First bug is a documentation bug on the web interface of the API (https://eu.api.ovh.com/console/#/dedicated/server/%7BserviceName%7D/serviceInfos#PUT), the python tab show the following code (using "my-server" as service name placeholder):

result = client.put('/dedicated/server/my-server/serviceInfos', 
    renew='{"manualPayment":true,"forced":false,"automatic":false,"deleteAtExpiration":false}', // Way of handling the renew (type: service.RenewType)
)

but this doesn't work! Actual working code is:

client.put('/dedicated/server/my-server/serviceInfos',
    renew={"manualPayment":True,"forced":False,"automatic":False,"deleteAtExpiration":False}
)

(using correct python structure that will be turned into json by the client, instead of json string that I guess will be turned into "json-ified" json \{\"manualPayment\":true,\"forced\":false,\"automatic\":false,\"deleteAtExpiration\":false\})

Second bug is in the API itself and is made of several smaller problems:

rbeuque74 commented 6 years ago

Please contact the official OVH API mailing-list for this non-related python-ovh issue. Mailing list information are available here: https://github.com/ovh/python-ovh/blob/master/README.rst#ovh-europe