This is a rather beefy change due to the number of usages of this
import. The changes are trivial though.
Change-Id: I7badeeaca438b0291f4ed86670e7f217e6372c61
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Registry service is deprecated and due for removal since past
couple of cycles. This patch removes functional and unit tests of
registry.
NOTE:
Skipped 'test_create_with_live_time' test as it was dependent on
test_registry_client and test_registry_api modules. Something is
wrong with the test and will be corrected once entire registry code
is removed from the code base.
Change-Id: I560ab5260bed7e43d83b67a00057ac48f9e366e9
In order to run the unit and functional Glance tests on Windows, we
have to:
* avoid monkey patching the os module on Windows (which causes Popen
to fail)
* update sqlite connection URL
* avoid os.fork, not available on Windows.
* we'll use subprocess.Popen when spinning up http servers.
* for the really simple ones defined in the test helpers, we'll just
use threads
* do not attempt to connect to '0.0.0.0', use '127.0.0.1' instead
* some tests aren't properly skipped (xattr ones), so we're covering that
as well
* skip log rotation test, we can't move in-use files. Log rotation can
be performed by the log handler itself.
* expect an exception when hitting connection timeouts
* avoid installing unavailable test requirements (xattr, pysendfile)
* pin the instance creation timestamp. some tests that deal with
markers rely on ordering, which can be flipped if the timestamps are
identical (can happen in case of resources created one after the
other, not sure yet if this happens really fast or the clock isn't
accurate enough).
* add a few seconds to some timeouts (much needed when running the tests
in VMs).
blueprint windows-support
Change-Id: Ife69f56a3f9f4d81e1e2e47fde4778efd490938f
Some of the files are opened but never closed. In this patch
done the changes to make the files close after the file
operations are executed
Change-Id: I968581d9befddbd2c8e0f7dc1ea0de7ff7bea98f
Closes-Bug: #1618465
There are several places in the source code where
HTTP response codes are used as numeric values.
These values are used from six.moves and the
numeric values are replaced by constants.
All of the used status codes were replaced with symbolic constants
from six.moves.http_client.
More about six.moves.http_client can be found at [2],
under the table "Supported renames:".
Also, this change improves code readibility.
This patchset does not extract numeric values from
the code itself, but it can be found at [1].
[1]: Ib9e26dcea927e96e65c626c18421621d3a29a64d
[2]: https://pythonhosted.org/six/#module-six.moves
Change-Id: Idfc7b043552f428f01ac3e47b270ee0639a8f5bc
Closes-Bug: #1520159
verbose option is going to be deleted soon (see
https://review.openstack.org/#/c/206437/ for more info
why it deprecated in oslo.log) because it confuses users
(we already have debug option). So we need to delete it from glance
tests.
Change-Id: Iade46a6097d153f2df0da73554bbfd3e2b1704f5
Utilizing assertIn and assertNotIn in a consistent way rather than
assertTrue( x <not> in y) and assertFalse(x in y).
Change-Id: Ic43d107c40a5a50b852ee476b1167c21e5ad86e8
* Log request id from the request context for glance-api
and glance-registry
* Further integrate with the common log module by storing RequestContext
objects in thread-local storage so loggers can acces their attributes
* Move request id formatting into the request module so it appears with
the preferred prefix (req-) in logs
* Implement bp glance-request-tracking
Change-Id: I2095ad16fef6b4bc8e49229c9f0326da8c743ff7
Fixes lp:772397
FileHandler opens the logfile at startup, keeps the stream open and
continues to log to it forever.
If logrotate decides to rotate the file, it will rename the original
file and a new file is created with the same attributes as the original
file.
The problem is that the process is still writing to the original file,
not the newly created file. Traditionally, system daemons respond to
a SIGHUP by re-opening log files and logrotate can be configured to
deliver this signal on rotation.
However, python has an elegant solution. WatchedFileHandler monitors
the inode for the specified log file name and, if that ever changes,
it re-opens the stream.
Nova already uses WatchedFileHandler to good effect. See:
https://code.launchpad.net/~soren/nova/logrotate/+merge/50292
Change-Id: I7f693f133d230d65d7c94ebf3a2ec0c8b362f993