- 'HEALTHY' means the db service is responsive, 'ACTIVE' means the db
service is alive.
- Remove the CI job fakemodetests, but will add similar testing task in
the future.
- Fix the periodic CI job
- Remove MongoDB and related jobs
Change-Id: I5abe9091ba203297dc87db5fba139179166321f7
As no content will be returned to the client if a root-disable request
succeeds, a HTTP 204 (Not Content) response is more appropriate.
Redis root-disable scenario test fails because it's return HTTP 204, but
all API related tests are expecting a HTTP 200. Although changing Redis
root-disable API is a much simpler way to resolve the problem, migrating
from HTTP 200 to HTTP 204 should be a better solution. Related tests and
documents are also updated accordingly.
APIImpact
Change-Id: If732a578009fd35436e810fb7ceceefd1ada3778
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
Change I3f020b6bcb1b9bf6d18a3b4f738c13cccd1bbff8 in
python-troveclient 2.11.0 changed the
troveclient.compat.client._logger variable to be a LOG
variable.
I have no idea how this hasn't been breaking the Trove
API examples CI job since python-troveclient 2.11.0 was
released. Maybe it has an no one has noticed or cared to
fix it.
Anyway, this adds hasattr checking in the test code to
set the log level on the correct variable based on which
version of troveclient is being used.
Also - no idea why setting the log level in the client
for these API tests is even necessary, but this dates back
to a change in 2014 so who knows. Not me.
--
This also fixes bug 1708171 by making nova run in
singleconductor mode so the affinity/anti-affinity
scheduling tests work. Trove CI is blocked by both
changes so they have to go together.
Change-Id: Iaf00fc55336a8049c8303b8fa2849df2366115e6
Closes-Bug: #1708190
Closes-Bug: #1708171
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
Replaced basestring with six.string_types
Replaced (int, long) with six.integer_types
Replaced unicode with six.text_type
This patch is generated by the following tool using
'basestring', 'long' and 'unicode' options.
Manually replaced unicode(ex) with oslo_utils.encodeutils(ex)
https://github.com/haypo/sixer
Command:
python sixer.py -w 'basestring,long,unicode' trove/
Partially implements: blueprint trove-python3
Change-Id: I6fa42674060067663ef819247ea793ef3d8aa0da
Added the route action for disabling the root user in the extensions.
Modified the resource extension to allow the generation of a DELETE
route on the resource itself.
Implemented root-disable on the mysql guest. Added not implemented
error messages for all other datastores.
Change-Id: I52519b86c47694c554b624d1d2fbe7a001af55fc
Partially implements: blueprint root-disable
Depends-On: I27831eb361c2b219a9623f152b9def73a2865d67
Replace the sqlalchemy engine and session management with an oslo.db
facade. This does the work transparently and fixes connection
mismanagement.
The changes involve:
- modifying the sqlalchemy session script to use oslo_db functions
- adding the oslo_db engine configuration parameters
- tweaking the faked tests to pass*
* the faked tests are sensitive to sleep calls and oslo_db uses a
sleep(0) hack which was causing issues. The coverage of the tests was
not affected.
Implements: blueprint move-to-oslo-db
Change-Id: I59f1fc0fe1551b9a815a51e6a620fabf060b013f
The constants of log levels were added in the 1.8 version of
the oslo.log library. So we can replace all usage of system
logging module with log module from oslo.log.
Use WritableLogger class from the loggers module of the oslo.log
library.
Change-Id: Ic93e25a9ca3a288cdfcdb75fbe40a7d1ba2a23c9
Closes-Bug: 1481370
This patchset helps reducing the ignored pep8 errors.
Fixed some ignored hacking rules, as listed follows:
- E111 indentation is not a multiple of four
- E122 continuation line missing indentation or outdented
- E123 closing bracket does not match indentation of opening bracket's line
- E128 continuation line under-indented for visual indent
- E251 unexpected spaces around keyword / parameter equals
- E265 block comment should start with '# '
- E713 test for membership should be 'not in'
- H105 Don't use author tags
- H306 imports not in alphabetical order
Change-Id: Iadf2af4f6ec90420153ad63b5a41650392ef2cbd
* Added Incremental backup test and resulting sample files.
* Fixed the example generator tests to actually fail when api
changes.
* Added changes since the last example generation was run.
* Added a --fix-examples flag to the example generator to
automatically correct the sample files.
Change-Id: I7ac355c80b251b0eccd3bd5b8d76d2287c255705
Closes-Bug: #1398119
This code adds a feature to the tests where all of the example
snippets are generated and then validated. Tests fail if the new
examples don't match the old ones, meaning a dev changing the API
must update the snippets, triggering a conversation about the changes
during the pull request.
Implements: blueprint example-snippet-generator
Change-Id: I5f1bfd47558a646a56e519614ae76a55759a4422