upcloud-php-api icon indicating copy to clipboard operation
upcloud-php-api copied to clipboard

Documentation incorrect for new cloud-init images

Open elindydotcom opened this issue 2 years ago • 0 comments

If you try to create an Ubuntu 22.04 server with this PHP api it will likely fail. This is because the Ubuntu 22.04 images are not 'native' but classified as 'cloud-init' images.

(The image template types for each os can be viewed here: https://api.upcloud.com/1.3/storage/public)

For these cloud-init templates it seems that the metadata service must be turned on with the api request otherwise the server provision request will fail.

The documentation has the metadata element as optional, defaulting to 'no'. https://github.com/UpCloudLtd/upcloud-php-api/blob/master/docs/Model/Server.md

Additionally, the createServer example should be changed since it can't just use the defaults (https://github.com/UpCloudLtd/upcloud-php-api/blob/master/docs/Api/ServerApi.md#createServer).

Alternatively, maybe the api should automatically enable the metadata service for the cloud-init templates and just ignore the metadata element in the request since setting it to 'no' will cause the request to fail anyway?

elindydotcom avatar Oct 07 '22 16:10 elindydotcom