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
Trying to create a kube cluster from API in Python. So I ran the command from the API Console and picked the Python code being generated.
But at the time of testing it, once authenticated, the code to call the post command seems to be incorrect:
result = client.post('/cloud/project/<serviceID>/kube',
='{"name":"test1","nodepool":{"antiAffinity":false,"autoscale":false,"desiredNodes":1,"flavorName":"d2-4","monthlyBilled":false,"name":"nodepool1"},"privateNetworkId":"A-private-network-id","region":"DE1","updatePolicy":"NEVER_UPDATE","version":"1.26"}', // Request Body (type: cloud.ProjectKubeCreation)
)
In fact, the code seems syntactically incorrect. I made this fix:
result = client.post('/cloud/project/<serviceID>/kube',
'{"name":"test1","nodepool":{"antiAffinity":false,"autoscale":false,"desiredNodes":1,"flavorName":"d2-4","monthlyBilled":false,"name":"nodepool1"},"privateNetworkId":"A-private-network-id","region":"DE1","updatePolicy":"NEVER_UPDATE","version":"1.26"}' )
And now at least is tried to run, but fires an exception "The input that you provided isn't valid JSON or not well formatted".
I've also tried to build a dict with all the parameters, then dump it into json format, but same error appeared.
It seems the code generated by the console is not ok.
The text was updated successfully, but these errors were encountered:
I'm facing the same problem with a POST request to create a new record (/domain/zone/{zoneName}/record) with this:
result = client.post(f'/domain/zone/{zone_name}/record', f'{{"fieldType":"A","subDomain":"{sub}","target":"{ip}","ttl":{ttl}}}', )
I've tried too without predefined variables, and the same: ovh.exceptions.BadParametersError: The input that you provided isn't valid JSON or not well formatted. I did the POST request through the web interface () and copy the code from the Python tab, and when pasting in my script, it raises the same error.
Trying to create a kube cluster from API in Python. So I ran the command from the API Console and picked the Python code being generated.
But at the time of testing it, once authenticated, the code to call the post command seems to be incorrect:
In fact, the code seems syntactically incorrect. I made this fix:
And now at least is tried to run, but fires an exception "The input that you provided isn't valid JSON or not well formatted".
I've also tried to build a dict with all the parameters, then dump it into json format, but same error appeared.
It seems the code generated by the console is not ok.
The text was updated successfully, but these errors were encountered: