You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/02/12 21:09:52 UTC
libcloud git commit: Revert addition of NodeDriver.ex_creation_time
Closes #703 ... now that we have Node.created_at
Repository: libcloud
Updated Branches:
refs/heads/trunk a19efb8a7 -> e2c8c0dd0
Revert addition of NodeDriver.ex_creation_time
Closes #703
... now that we have Node.created_at
This reverts commit e513687ea8e335b4a71d9f6e569f61bfcb65b0e9.
Signed-off-by: Allard Hoeve <al...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e2c8c0dd
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e2c8c0dd
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e2c8c0dd
Branch: refs/heads/trunk
Commit: e2c8c0dd0526b8bab4ade45191bda4b659126203
Parents: a19efb8
Author: Allard Hoeve <al...@gmail.com>
Authored: Fri Feb 12 09:56:22 2016 +0100
Committer: anthony-shaw <an...@gmail.com>
Committed: Sat Feb 13 07:09:02 2016 +1100
----------------------------------------------------------------------
CHANGES.rst | 8 ++------
libcloud/compute/drivers/digitalocean.py | 12 ------------
libcloud/compute/drivers/ec2.py | 12 ------------
libcloud/test/compute/test_digitalocean_v2.py | 5 -----
libcloud/test/compute/test_ec2.py | 13 -------------
5 files changed, 2 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/e2c8c0dd/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 3168cce..bfa405c 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -47,14 +47,10 @@ Compute
(GITHUB-694)
[Jeff Dunham]
-- Support for creation time (`ex_created_time`) in EC2 and digitalocean drivers
- (GITHUB-697)
- [Rick van de Loo]
-
-- Added `Node.create_at` which, on supported drivers, contains the datetime the
+- Added `Node.created_at` which, on supported drivers, contains the datetime the
node was first started.
(GITHUB-698)
- [Allard Hoeve]
+ [Allard Hoeve] [Rick van de Loo]
Storage
~~~~~~~
http://git-wip-us.apache.org/repos/asf/libcloud/blob/e2c8c0dd/libcloud/compute/drivers/digitalocean.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/digitalocean.py b/libcloud/compute/drivers/digitalocean.py
index a390352..0428cbb 100644
--- a/libcloud/compute/drivers/digitalocean.py
+++ b/libcloud/compute/drivers/digitalocean.py
@@ -454,18 +454,6 @@ class DigitalOcean_v2_NodeDriver(DigitalOcean_v2_BaseDriver,
method='DELETE')
return res.status == httplib.NO_CONTENT
- def ex_get_creation_time(self, node):
- """
- Return the date and time that represent when the Instance was created.
- :param node: Node instance
- :type node: :class:`Node`
-
- :return: ISO8601 combined date and time format string for when the
- Droplet was created.
- :rtype: ``str``
- """
- return node.extra['created_at']
-
def get_image(self, image_id):
"""
Get an image based on an image_id
http://git-wip-us.apache.org/repos/asf/libcloud/blob/e2c8c0dd/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 8367a14..2562c72 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -4256,18 +4256,6 @@ class BaseEC2NodeDriver(NodeDriver):
"""
return node.extra['tags']
- def ex_get_creation_time(self, node):
- """
- Return the date and time that represent when the Instance was created.
- :param node: Node instance
- :type node: :class:`Node
-
- :return: ISO8601 combined date and time format string for when the
- Instance was created.
- :rtype: ``str``
- """
- return node.extra['launch_time']
-
def ex_allocate_address(self, domain='standard'):
"""
Allocate a new Elastic IP address for EC2 classic or VPC
http://git-wip-us.apache.org/repos/asf/libcloud/blob/e2c8c0dd/libcloud/test/compute/test_digitalocean_v2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_digitalocean_v2.py b/libcloud/test/compute/test_digitalocean_v2.py
index 5f14b7c..1754ce1 100644
--- a/libcloud/test/compute/test_digitalocean_v2.py
+++ b/libcloud/test/compute/test_digitalocean_v2.py
@@ -149,11 +149,6 @@ class DigitalOcean_v2_Tests(LibcloudTestCase):
result = self.driver.destroy_node(node)
self.assertTrue(result)
- def test_ex_get_creation_time(self):
- node = self.driver.list_nodes()[0]
- creation_time = self.driver.ex_get_creation_time(node)
- self.assertEqual(creation_time, "2014-11-14T16:29:21Z")
-
def test_ex_rename_node_success(self):
node = self.driver.list_nodes()[0]
DigitalOceanMockHttp.type = 'RENAME'
http://git-wip-us.apache.org/repos/asf/libcloud/blob/e2c8c0dd/libcloud/test/compute/test_ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py
index 4f1bbe1..2356230 100644
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@ -975,19 +975,6 @@ class EC2Tests(LibcloudTestCase, TestCaseMixin):
self.assertEqual(metadata['Num'], '42')
self.assertEqual(len(metadata), 3)
- def test_ex_get_creation_time(self):
- image = NodeImage(id='ami-be3adfd8',
- name=self.image_name,
- driver=self.driver)
- size = NodeSize('m1.small', 'Small Instance', None, None, None, None,
- driver=self.driver)
- node = self.driver.create_node(name='foo',
- image=image,
- size=size)
-
- creation_time = self.driver.ex_get_creation_time(node)
- self.assertEqual(creation_time, '2007-08-07T11:51:50.000Z')
-
def test_ex_get_limits(self):
limits = self.driver.ex_get_limits()