You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
)
(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:
first: the manualPayment and deleteAtExpiration do not work as expected. When trying to switch a server that is on automatic payment (call to GET /dedicated/server/my-server/serviceInfos returns "automatic":true,"manualPayment":false,"deleteAtExpiration":false,"period":1} ), I would expect to pass renew={"manualPayment":True,"forced":False,"automatic":False,"deleteAtExpiration":True} to PUT /dedicated/server/my-server/serviceInfos but then I get ovh.exceptions.BadParametersError: Arguments conflicting. Indeed I have to pass renew={"manualPayment":True,"forced":False,"automatic":False,"deleteAtExpiration":False} which does toggle the state of the server to manual payment AND delete at expiration (call to GET /dedicated/server/my-server/serviceInfos returns "automatic":false,"manualPayment":true,"deleteAtExpiration":true,"period":1} ). But calling the exact same code again (manual: true, deleteAtExpiration: false) will toggle the server back to automatic payment!
second: automatic and manualPayment parameters (for the same endpoint) are mutually exclusive (if it is automatic, it can't be manual, and vice-versa) so this is redundant at best, error-prone at worst.
third (as bonus): forced is useless, as it can't be changed but is mandatory all the same. ovh.exceptions.BadParametersError: Can not change forced field of the service if you try to change it, ovh.exceptions.BadParametersError: [renew] Missing properties: (forced) for type RenewType if missing
The text was updated successfully, but these errors were encountered:
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):
but this doesn't work!
Actual working code is:
(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:
manualPayment
anddeleteAtExpiration
do not work as expected. When trying to switch a server that is on automatic payment (call toGET /dedicated/server/my-server/serviceInfos
returns"automatic":true,"manualPayment":false,"deleteAtExpiration":false,"period":1}
), I would expect to passrenew={"manualPayment":True,"forced":False,"automatic":False,"deleteAtExpiration":True}
toPUT /dedicated/server/my-server/serviceInfos
but then I getovh.exceptions.BadParametersError: Arguments conflicting
. Indeed I have to passrenew={"manualPayment":True,"forced":False,"automatic":False,"deleteAtExpiration":False}
which does toggle the state of the server to manual payment AND delete at expiration (call toGET /dedicated/server/my-server/serviceInfos
returns"automatic":false,"manualPayment":true,"deleteAtExpiration":true,"period":1}
). But calling the exact same code again (manual: true, deleteAtExpiration: false) will toggle the server back to automatic payment!automatic
andmanualPayment
parameters (for the same endpoint) are mutually exclusive (if it is automatic, it can't be manual, and vice-versa) so this is redundant at best, error-prone at worst.forced
is useless, as it can't be changed but is mandatory all the same.ovh.exceptions.BadParametersError: Can not change forced field of the service
if you try to change it,ovh.exceptions.BadParametersError: [renew] Missing properties: (forced) for type RenewType
if missingThe text was updated successfully, but these errors were encountered: