CloudVE / cloudbridge

A consistent interface to multiple IaaS clouds; in Python.
https://cloudbridge.cloudve.org
MIT License
113 stars 51 forks source link

Add VM instance create time property for all providers #299

Closed rodrigonull closed 2 years ago

rodrigonull commented 2 years ago

Add the ability to retrieve the VM instance creation time for all supported providers.

rodrigonull commented 2 years ago

@rodrigonull Thanks for this contribution. Do all the methods return a python datetime object? Can we add a test for that?

Only AWS and Azure return a datetime object. GCP and OpenStack return an ISO 8601 string. I was wondering if we should convert the string to datetime, but that probably would require to import a third party library, like dateutil, because I think only in python 3.7 a method was added that allows to convert a ISO 8601 string to datetime. What do you think?

nuwang commented 2 years ago

I think only in python 3.7 a method was added that allows to convert a ISO 8601 string to datetime. What do you think?

I think we could go for that, since support for python<3 has already been dropped, and most people are likely above 3.7. Alternatively, we could return an ISO 8601 string if that's easier.

nuwang commented 2 years ago

Released in v3.1.0