-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels