OpenStack Database As A Service (Trove)
Go to file
Amrith Kumar 109ff94951 Handle isotime deprecation in oslo_utils.timeutils
oslo_utils.timeutils is deprecating isotime(). In reality they are
deprecating some other things as well but Trove doesn't (currently)
use any of those things.

Much has been written on the subject of this deprecation. I think the
proposal to merely replace isotime with datetime.datetime.isoformat()
is a little simplistic. Well intentioned, but nonetheless I believe
that it is simplistic.

The primary issue I could find with oslo_utils.timeutils.isotime() was
the fact that it was naive. I think it could well have been fixed in
oslo_utils but for whatever reason(s) oslo decided not to want to go
that route.

The primary challenge from Trove's perspective is that I want to
respect the existing API contract while at the same time get an
implementation of time handling that is not identical in its flaws
with oslo_utils.timeutils.isotime().

This change set attempts to address that by making
trove.common.timeutils.isotime() that is aware. It also implements a
utcnow_aware() function that is aware.

ISO 8601 allows for four representations of timezone and those are

<time>Z
<time>[+-]hh:mm
<time>[+-]hhmm
<time>[+-]hh

Trove conventionally used the first one, even if the time wasn't
really a UTC time. That's one of the things being fixed here.

In review cp16net asked whether this change removes the 'Z' at the end
of time strings generated by the isotime() function. The answer is
NO. The new isotime() function performs identical to the old and now
deprecated function in oslo_utils.timeutils for UTC (Z) times.

There was a utcnow() function in trove.common.utils which just wrapped
datetime.datetime.utcnow(). That has been moved now to
trove.common.timeutils with the other new time related functions.

There were a couple of places in Trove where code was using
datetime.now() which was not ideal. Those have been corrected now as
well.

Unit tests have been proposed for the new routines.

Closes-Bug: #1532120
Change-Id: Ic5abf6669edd4f1a9fd62e61f437565aa887aebe
2017-06-09 16:22:11 +00:00
api-ref/source unwedge the gate 2017-01-29 18:37:11 -05:00
apidocs/src/samples Fix backup of mysql variants on Centos 2016-12-13 16:29:41 +00:00
contrib Fixes hacking rules 2015-05-29 07:27:59 +00:00
devstack enable trove-api behind mod-wsgi 2017-04-25 06:54:29 -04:00
doc How to create a trove instance 2017-05-26 18:10:40 +00:00
etc Add port 16379 to conf.sample 2017-04-26 03:08:28 +00:00
install-guide/source fix-gate: change trove auth URL's to reflect new URL settings 2017-04-23 00:17:13 +00:00
integration Merge "trovestack doesn't understand the new systemd based system" 2017-05-29 22:45:53 +00:00
releasenotes Merge "Update reno for stable/ocata" 2017-06-06 01:05:54 +00:00
tools Handle readfp deprecation 2017-03-02 07:26:27 +00:00
trove Handle isotime deprecation in oslo_utils.timeutils 2017-06-09 16:22:11 +00:00
.coveragerc Update some information 2016-10-24 04:12:55 +00:00
.gitignore Cleanup trove's tox.ini and .gitignore 2016-08-30 15:33:36 -04:00
.gitreview Renamed repos to trove. 2013-06-14 18:25:42 -04:00
.testr.conf Rename from reddwarf to trove. 2013-06-24 14:11:15 -07:00
CONTRIBUTING.rst Merge "Typo fix: encouter => encounter, lastest => latest" 2017-02-07 04:13:05 +00:00
HACKING.rst Add translation_checks for i18n 2017-01-29 03:04:10 +00:00
LICENSE Add Apache 2.0 LICENSE file. 2013-04-29 18:01:12 -04:00
README.rst Show team and repo badges on README 2016-12-01 22:07:32 +00:00
babel.cfg Setup trove for translation 2014-03-19 15:06:23 +01:00
blacklist-py3.txt Remove blacklist test volume 2016-10-26 05:27:09 +00:00
generate_examples.py Fixes hacking rules 2015-05-29 07:27:59 +00:00
pylintrc initial chkin of pylint 2016-09-14 13:56:24 -04:00
requirements.txt Updated from global requirements 2017-06-08 06:12:38 +00:00
run_tests.py secure oslo_messaging.rpc 2017-01-11 07:56:35 -05:00
run_tests.sh Remove extraneous vim configuration comments 2014-02-27 15:05:21 +08:00
setup.cfg Merge "Revert "Remove the tempest plugin"" 2017-04-11 07:27:54 +00:00
setup.py Updated from global requirements 2017-03-02 11:57:16 +00:00
test-requirements.txt Updated from global requirements 2017-06-08 06:12:38 +00:00
tox.ini we now need to have dib installed explicitly 2017-03-10 08:14:20 -05:00

README.rst

Trove

image

Trove is Database as a Service for OpenStack.

Getting Started

If you'd like to run from the master branch, you can clone the git repo:

git clone https://github.com/openstack/trove

You can raise bugs here: https://bugs.launchpad.net/trove

Python client

https://git.openstack.org/cgit/openstack/python-troveclient

References