From dbb9e9d882471978037949360c34fb4636f13d11 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Tue, 2 Feb 2016 12:30:32 -0500 Subject: [PATCH] Remove 'date' from Object resource While creating the various type formatters for properties, I created one for the timestamp format used on the Date prop that is included in the headers of account, container, and object resources. However, that property just duplicates that of the X-Timestamp prop. Since the format of X-Timestamp is also used elsewhere, it doesn't make much sense to both include the duplicated info in Date along with having a custom formatter for it. This change removes Date entirely (it never existed on account or container, but was about to be added in another change which spurred its removal here). Change-Id: Ia458f0d6cb4ba4f4500df97cd58c62afd6d5b05f --- openstack/object_store/v1/obj.py | 2 -- openstack/tests/unit/object_store/v1/test_obj.py | 1 - 2 files changed, 3 deletions(-) diff --git a/openstack/object_store/v1/obj.py b/openstack/object_store/v1/obj.py index 86e0c9cc2..8bf7a29b6 100644 --- a/openstack/object_store/v1/obj.py +++ b/openstack/object_store/v1/obj.py @@ -104,8 +104,6 @@ class Object(resource.Resource): etag = resource.header("etag") #: Set to True if this object is a static large object manifest object. is_static_large_object = resource.header("x-static-large-object") - #: The transaction date and time. - date = resource.header("date") #: If set, the value of the Content-Encoding metadata. #: If not set, this header is not returned by this operation. content_encoding = resource.header("content-encoding") diff --git a/openstack/tests/unit/object_store/v1/test_obj.py b/openstack/tests/unit/object_store/v1/test_obj.py index f181bbaf0..88772e958 100644 --- a/openstack/tests/unit/object_store/v1/test_obj.py +++ b/openstack/tests/unit/object_store/v1/test_obj.py @@ -101,7 +101,6 @@ class TestObject(testtools.TestCase): self.assertEqual(datetime(2016, 1, 21, 22, 10, 56, 281120, tzinfo=iso8601.UTC), sot.timestamp) - self.assertEqual(headers['date'], sot.date) self.assertEqual(headers['content-type'], sot.content_type) self.assertEqual(datetime(2016, 1, 21, 22, 43, 46, 167440, tzinfo=iso8601.UTC),