libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allardhoeve <>
Subject [GitHub] libcloud pull request: Add created datetime to node
Date Wed, 10 Feb 2016 14:53:06 GMT
GitHub user allardhoeve opened a pull request:

    Add created datetime to node

    Instead of the implementation in #697, I'd like to propose this instead. 
    The problem with #697 is that when you want to find a list of old nodes when you have
a list of `Node` objects, you'd need to write:
    old_nodes = [n for n in nodes if n.driver.ex_creation_time(n) > too_old]
    Yuk, why is that driver in there? Better would be to write:
    old_nodes = [n for n in nodes if n.created > too_old]
    I have implemented this code for OpenStack, Digital Ocean and EC2. Other drivers, I have
no access to. In those cases, the behaviour is to have `created` be `NoneType`.

You can merge this pull request into a Git repository by running:

    $ git pull add-created-datetime-to-node

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #698
commit 00ada75ccddd32eaecfe0fe6aed2ec50e63daa69
Author: Allard Hoeve <>
Date:   2016-02-10T14:18:02Z

    EC2 nodes have a filled `created` attribute

commit 49323b5b258e2df948ccc1122245313d3a3043c2
Author: Allard Hoeve <>
Date:   2016-02-10T14:28:55Z

    Digital Ocean nodes have filled `created` attribute

commit 3a26d50a2de64197464b20c0eb868b477225c11d
Author: Allard Hoeve <>
Date:   2016-02-10T14:42:30Z

    OpenStack nodes have filles  attribute


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message