apache / libcloud

Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API.
https://libcloud.apache.org
Apache License 2.0
2.03k stars 929 forks source link

Updated Linode (Akamai Connected Cloud) support (including cloud-init) #1946

Closed mraygalaxy2 closed 10 months ago

mraygalaxy2 commented 11 months ago

Updated Linode (Akamai Connected Cloud) support (including cloud-init)

Description

  1. cloud-init support is a new feature available in 2023.
  2. The main entry point (create_node) had an arrangement of non-keyword parameters that were not consistent with other libcloud drivers. This has been fixed.
  3. One remaining function (already available in the API) was exposed to also be consistent with other drivers.

Status

Checklist (tick everything that applies)

Kami commented 10 months ago

Thanks for the contribution.

When you get a chance, can you please add some test case for those changes? Thanks.

Kami commented 10 months ago

It also seems like that it may be a good idea to rename the driver in the future (Akamai Connected Cloud)?

We can still leave (deprecated) "linode" alias in place for the foreseeable future to make the change backward compatible.

mraygalaxy2 commented 10 months ago

Acknowledged @Kami . I'll work on that.

Regarding the name change, we haven't been directed to do that right now by the company, particularly as the API endpoint (api.linode.com) is unable to change for the forseeable future.

mraygalaxy2 commented 10 months ago

okie dokie @Kami I've pushed those tests. Take a 2nd look?

mraygalaxy2 commented 10 months ago

NOTE: I do want to remove (or cleanup) this comment: https://github.com/apache/libcloud/pull/1946/commits/d8add44eec876cae1103b99d545a747a0e33a4bc#diff-e2e26eb0ef50c4cf2bf6b12658cd644d7ca1fe06cd2a3bc307d607149c83a2a4R976

Looking for feedback before I do that.

Kami commented 10 months ago

@mraygalaxy2 Thanks for adding the tests and addressing some very old API inconsistency in the create_node() method.

I think it would be good to document that breaking API change in the upgrade notes file (https://github.com/apache/libcloud/commit/d8add44eec876cae1103b99d545a747a0e33a4bc#r127271125).

Besides that, LGTM.

mraygalaxy2 commented 10 months ago

@Kami Thank you, sir. I'll push a change right now to update that document.

Kami commented 10 months ago

@mraygalaxy2 Thanks. There is one more small thing which I thought I already commented on in the past (https://github.com/apache/libcloud/pull/1946/files#r1324941487), but maybe I forgot to :)

mraygalaxy2 commented 10 months ago

OK, base64 changes complete. Also tell me if those those docs/upgrade_notes.rst and CHANGES.rst changes look ok. I'm happy to clean them up if there's a mistake.

Kami commented 10 months ago

Thanks for addressing the review feedback.

I made some small changes and merged it into trunk:

mraygalaxy2 commented 10 months ago

Thank you so much, @Kami for the changes! Much appreciated.