These do not seem to have been created and
made appear, so make them appear and make sure
the exposed public API(s) have docstrings so
that they appear in the generated docs.
Change-Id: Ie34e46647b0b20d936ddaa15dc824d0e2d2ca99d
Also makes the docs look more like the other
oslo libraries so that the content is easily readable
across projects.
Change-Id: I85158a89f103cdef2afa268558592c46ce6c3411
Provide a more complete description in README.rst, which is used
when viewing the library on pypi.
Also standardize the short-description used in setup.cfg.
Change-Id: Ief38e3f75918c94a143d9369756747a24bb778b0
The earlier patch fixed a logic error with the way mocks were handled in
TestIsIPv6Enabled. This patch replaces fixtures with method decorators
to do the mocking, bringing the mock definition closer to the function
that is using it.
Change-Id: I9f5649c73da2e5db7edee53dc6a4cbb26e4f675b
test_netutils monkey patches os.path.exists() and
six.moves.builtins.open() using mock, but it didn't stop the patchs.
A side effect is that test_excutils started to fail when executed after
test_netutils. Randomly, test_excutils was executed before or after
test_netutils, so test_excutils failure was random.
Closes-Bug: #1433800
Change-Id: Ifbe79c52f34b4373721e9aa2e22eb86f39b60b87
This code is appearing in various projects (currently
oslo.messaging, taskflow, oslo.concurrency) and it seems
better placed in this little utility helper to avoid
people from duplicating it.
Change-Id: I177d79d4561b3eb13822d3e2ae4a9fbe011f586a
The existing timeutils provides a way to measure durations
that is also used to get actual times and dates; for most
cases this dual ability is not needed and the user only cares
about the duration between two time points. In cases where
ntpd may affect the machine clock this usage is also incorrect
and may go backwards in time...
To support this kind of specific and frequently occurring usage
a stopwatch class can be used that can enable more accurate
gathering of *just* durations (and using monotonic time when
it's available in python 3.3+ or optionally when the library
at http://pypi.python.org/pypi/monotonic is installed).
This code comes from taskflow, but oslo.messaging has similar
code that they could replace with this (and I imagine tooz
could also use this); among others...
Change-Id: I950e26c1eb8283a134fb4f16544f87bc5d29fd82
Instead of always assuming the best logger to use when
a exception is being dropped is the root logger (which
it may not always be) allow for providing a custom
logger when using this functionality + class so that
users can direct it to a logger of there choosing.
Change-Id: Ic56892be9d007229f5c302a2c6da19f00e91752e
When greenthreads are being used (and/or eventlet is available and
some modules have been monkey-patched) emit warnings to the users
that certain modules should be monkey-patched and if they are not
then spurious or unexpected lock-ups and/or hangs may result due to
this type of mixed usage which doesn't typically end well.
This commit adds that functionality to a new eventlet utils module
that can be used by calling code when that code really knows it will
not work without modules being patched or partially being patched.
Change-Id: I9a856fc0a6502b438c8da9b2f589154a6fa89a9f
We now have the ability to generate iso8601 dates, with microseconds,
from timestamps.
Change-Id: I2d87fa22148098d428115bfcd0b4ce3879a07c38
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
There was no fixture for using the functions related to
timeutils.set_time_override. A fixture is handy because
clear_time_override must be done for cleanup.
Change-Id: Ifef8d9f20fa9e5aa96ebf5040f290f65b503f0bd
Now we have the ability to generate a timestamp with microseconds.
Change-Id: I34d51b71c01df02bef46639149fde08f89f0e110
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
This properly deploys the oslo.utils package may resolve
sphinx build errors for projects which have not yet
upgraded to oslo_utils.
Change-Id: I4db750fb2356ebf44a8fccf7c422b474fefec0ee
If no default interface is available in netutils._get_my_ipv4_address(),
return LOCALHOST immediately. Without this change, an UnboundLocalError
exception will be raised instead.
Co-Authored-By: Ruby Loo <rloo@yahoo-inc.com>
Change-Id: I098450c32ef8ad467298c845dd0122da3e3cda3e
Closes-Bug: #1405217
Closes-Bug: #1408701
Only apply substitution patterns related to key values that appear in
the string.
Replace .*? in patterns with more explicit patterns that don't require
backtracing.
Add a performance test script for future testing work, with references
to large data files that can be downloaded but that we don't want to
check into the source repository because of their sizes.
Change-Id: Ic3ed252d181c93b8a0db465db6c8c4a7ca97da42
Related-bug: #1408362
Move the public API out of oslo.utils to oslo_utils. Retain the ability
to import from the old namespace package for backwards compatibility for
this release cycle.
bp/drop-namespace-packages
Change-Id: Ic6dd62097399bf75e3d11b4d8a6400971069c415
According to RFC 4122 (on uuid), uuids are case insensitive but
currently is_uuid_like returns False if the input is a non-lowercase
string. This change adds non-lowercase uuid support in is_uuid_like.
Change-Id: Ie017e183c3ee36b8dea9c1aa82cdb697c26bbf17
Closes-Bug: #1405624
Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.
Change-Id: I888d3e2905755ae7833231363d5dab66799a4a48
Provide more detailed error reporting when we cannot figure out what the
IPv4 address of the server is.
Change-Id: Ifac8a2109ae00c9c2624e03725f41b6052890f77