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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user