exoscale / cs

A simple, yet powerful CloudStack API client for python and the command-line.
BSD 3-Clause "New" or "Revised" License
88 stars 36 forks source link

Support POST for larger userdata in deployVirtual Machine #128

Closed synergiator closed 9 months ago

synergiator commented 9 months ago

According to API documentation, userdata parameter can be allowed to be large with POST method.

In the existing clients, this has not been supported: CloudMonkey implements this only in the upcoming release 6.4.0.

Also, this Python client seems to user GET, also when userdata parameter is larger than 8K:

send: b'GET /client/api?projectid=0..1fa&userdata=zoK...wOQ&...
command=deployVirtualMachine&response=json&signatureVersion=3&
expires=2023-11-13T19%3A12%3A09%2B0000&signature=so..Q5n4%3D
HTTP/1.1\r\nHost: XXXXX\r\nAccept-Encoding: identity\r\nUser-Agent: python-urllib3/2.0.7\r\n\r\n'
greut commented 9 months ago

try cs = CloudStack(..., method='post'), cf. https://github.com/exoscale/cs/blob/master/cs/client.py#L203

synergiator commented 9 months ago

thx