Activity log for bug #1620254

Date Who What changed Old value New value Message
2016-09-05 10:21:44 Kevin Benton bug added bug
2016-09-05 10:23:00 Kevin Benton neutron: assignee Kevin Benton (kevinbenton)
2016-09-05 10:23:04 Kevin Benton neutron: milestone newton-rc1
2016-09-05 11:00:38 Kevin Benton summary OVO DateTimeField is not compatible with our timestamps OVO to_dict() is returning timestamps with microseconds
2016-09-05 11:04:21 Kevin Benton description The timestamps we store in the DB do not preserve microseconds because we use the default mysql datetime field which chops them off (or rounds depending on DB connector). This means that the timestamp will lose precision as it's stored in the DB so an object before DB persistence would not be equal to the same object after restored from the DB. Also, from an API perspective, it creates an inconsistency because 'OVO native' resources that use the common DB to_dict() to generate the API response will include microseconds while the existing resources only return precision in the seconds field. to_dict() doesn't seem to be calling the stringify or to_primitive method on the objects because microseconds are being leaked out when trying to expose the created_at/updated_at fields via the API. Traceback (most recent call last): File "/opt/stack/new/neutron/neutron/tests/tempest/api/test_qos.py", line 338, in test_get_policy_that_is_shared self.assertEqual(obtained_policy, policy) File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 411, in assertEqual self.assertThat(observed, matcher, message) File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 498, in assertThat raise mismatch_error testtools.matchers._impl.MismatchError: !=: reference = {u'created_at': u'2016-09-03 01:08:00', u'description': u'shared policy', u'id': u'b24af3be-d19d-4543-8b12-25ac6d752abd', u'name': u'test-policy-shared', u'rules': [], u'shared': True, u'tenant_id': u'a88290171ee648dfa97b8e164b9ede31', u'updated_at': u'2016-09-03 01:08:00'} actual = {u'created_at': u'2016-09-03 01:08:00.106856', u'description': u'shared policy', u'id': u'b24af3be-d19d-4543-8b12-25ac6d752abd', u'name': u'test-policy-shared', u'rules': [], u'shared': True, u'tenant_id': u'a88290171ee648dfa97b8e164b9ede31', u'updated_at': u'2016-09-03 01:08:00.106856'}
2016-09-05 14:39:53 OpenStack Infra neutron: status New In Progress
2016-09-05 16:09:57 Armando Migliaccio neutron: importance Undecided High
2016-09-07 16:46:12 OpenStack Infra neutron: status In Progress Fix Released