From 90f7900d23fc01abc028b8c828563f758895c4cb Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Wed, 10 Jun 2015 13:29:44 -0500 Subject: [PATCH] Move Server.created to created_at Other resources have timestamps with an "_at" suffix, which makes more sense to converge on than without the suffix, otherwise it looks like a boolean name. Change-Id: I9097d0309ce3bbf6340fbce623321c6d41cf57c7 Closes-Bug: 1435880 --- openstack/compute/v2/server.py | 2 +- openstack/tests/unit/compute/v2/test_server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack/compute/v2/server.py b/openstack/compute/v2/server.py index d8f825f9..5f56ff97 100644 --- a/openstack/compute/v2/server.py +++ b/openstack/compute/v2/server.py @@ -44,7 +44,7 @@ class Server(resource.Resource): #: of the IP address. *Type: dict* addresses = resource.prop('addresses', type=dict) #: Timestamp of when the server was created. - created = resource.prop('created') + created_at = resource.prop('created') #: A dictionary with details on the flavor this server is running. #: The dictionary includes a key for the ``id`` of the flavor, as well #: as a ``links`` key, which includes a list of relevant links for this diff --git a/openstack/tests/unit/compute/v2/test_server.py b/openstack/tests/unit/compute/v2/test_server.py index ad0b6db5..e5efeb84 100644 --- a/openstack/tests/unit/compute/v2/test_server.py +++ b/openstack/tests/unit/compute/v2/test_server.py @@ -66,7 +66,7 @@ class TestServer(testtools.TestCase): self.assertEqual(EXAMPLE['accessIPv4'], sot.access_ipv4) self.assertEqual(EXAMPLE['accessIPv6'], sot.access_ipv6) self.assertEqual(EXAMPLE['addresses'], sot.addresses) - self.assertEqual(EXAMPLE['created'], sot.created) + self.assertEqual(EXAMPLE['created'], sot.created_at) self.assertEqual(EXAMPLE['flavorRef'], sot.flavor) self.assertEqual(type(sot.flavor), flavor.Flavor) self.assertEqual(EXAMPLE['hostId'], sot.host_id)