The neutron.db.sqlalchemytypes module we rehomed into neutron-lib [1].
This patch consumes it by removing the module and unit tests from
neutron and using them from neutron-lib where applicable.
NeutronLibImpact
[1] https://review.openstack.org/#/c/639117/
Change-Id: I3ab76ca3813d550a4de454cc83156a55325f6abc
During the development of patch [1], it became apparent
that the DB was rounding the microseconds part of a datetime
object. This caused inconsistencies between what would be
stored in the DB and what was returned to the user via the
API because the API uses strftime.
For an example, see the INSERT statement on L1-L2 and then
the subsequent retrieval of the same record on L43 of [2].
The microseconds were rounded up even though the mysql docs
say they will be truncated.
In order to ensure consistency across SQL drivers, backends,
and our API, this patch adds a TruncatedDateTime object which
truncates off the microseconds before they go into the database.
1. I78b00516e31ce83376d37f57299b2229b6fb8fcf
2. http://paste.openstack.org/show/565116/
Closes-Bug: #1619299
Change-Id: I47d5ad5a5cdc0cb0d61f0642616cccc8f341ed62
* Detect neutron.i18n import (neutron._i18n is recommended)
* Check builtins _ usage
* 'builtins = _' in tox.ini is no longer required.
* Introduce hacking rule doctest framework.
Newly added check_builtins_gettext() hacking check takes
token as argument. It is not a good idea to pass a tokenized
line manually. Instead it is reasonable to use docstring based
tests used in hacking repo.
Change-Id: Ib7464658fc4c8a6f1b03af6ab46f0bd3ee0bfb18