| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Iea2cbac5b482820504829113e3d912036fd584f5
|
|
|
|
| |
Change-Id: I9355c2760ac82d9e17e29ccb5350643ac378b746
|
|
|
|
| |
Change-Id: I8aabfb8b28ff3bee9c55010f7449616e057bca94
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The mask_password function was missing the versionchanged to
signify the addition of 'configdrive' to the list of sanitized
keys.
Change-Id: Ia2bf37ad6d757f3fcb1f4144c979182b05e672a3
|
|/
|
|
|
|
|
|
|
|
| |
This method exists in Nova[1] and Cinder[2], and it seems other
projects can also leverage it.
[1]http://git.openstack.org/cgit/openstack/nova/tree/nova/utils.py#n1088
[2]http://git.openstack.org/cgit/openstack/cinder/tree/cinder/utils.py#n676
Change-Id: I2e595404b564dbd363af545945a6bde37f70a4c2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
With latest bandit version, The bandit.yaml is only necessary
for advanced tweaking. We can just use the defaults.
Change-Id: Ie635370474f5e86d0d6188a52b581f04b14bd484
|
| |
| |
| |
| | |
Change-Id: Ia408f1e02c26bbb5d5dd48a0a913e6e233a9d3ae
|
| |
| |
| |
| |
| |
| |
| | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I35a3abbc04fc86f498dd9c6460a20c41f4ad4ea5
|
|/
|
|
| |
Change-Id: I9b898092ed717b1ad335d67583db88b2c209797d
|
|
|
|
|
|
|
|
| |
Rather than have the tests guess how many times
sys.getfilesystemencoding is going to be called, narrow the mock to
just the encodeutils module.
Change-Id: Ia52d4f380e4053e8962ce9dfc674e732baa167fb
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow new infra setup for translations, see spec
http://specs.openstack.org/openstack-infra/infra-specs/specs/translation_setup.html
for full details.
This basically renames
oslo.utils/locale/oslo.utils.pot to
oslo_utils/locale/oslo_utils.pot. For this we need to update
setup.cfg.
Update also domain name in _i18n.py.
Change-Id: Ie4837571b06dd08da9676bf6a3f6eca932559fb1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
assertTrue is weaker than assertEqual(True,..) because
assertEqual also compares the type.
If we expect a boolean and know that we are getting a boolean then
assert for a boolean, not for something that evaluates to true.
This reverts commit e995d73488731c47c2e3cc3de7e0b52869ef298e.
Change-Id: Ia3c5418b8d98ad23b70c2c0191a64a4f2f590040
|
| |/
|/|
| |
| | |
Change-Id: I887aee2a7e9c1512d03ad1ecd63f24201d4eb88a
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: Ie0972ca5634547ce3a71f7755905d3081008a2f8
|
| | |
| | |
| | |
| | | |
Change-Id: Iac94294cf8d8c41fea31e8e62b2b290d532db729
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The function replaces a very common pattern in code base supporting
Python 2 and Python 3:
if isinstance(text, six.text_type):
text = text.encode('utf-8')
to_utf8() accepts subtypes of bytes and six.text_type. For example,
oslo.i18n Message objects are accepted and encoded to UTF-8 as
expected.
Using encodeutils.safe_encode(text) is not reliable because it relies
on the current locale encoding which can be ASCII, whereas UTF-8 is
expected. Having to write encodeutils.safe_encode(text,
incoding='utf-8') is not obvious and error-prone (it's easy to forget
the incoming parameter).
Change-Id: I00463716b6012cbef383855999f63f99f2f52540
|
|\ \ \ \
| |/ / /
|/| / /
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This code (or a version of it) is being shared by at least nova
and keystonemiddleware and it seems like a good idea to move it
to being common shared code (especially due to the importance
of getting this code correct).
This adds an initial secretutils and adds tests for it.
Change-Id: Ia603202a065d5b345608e712f63f7af21fd74dea
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The coverage job was failing because the test code was faking
sys.getfilesystemencoding to return a value that didn't work when
it was called later by coverage.
Change-Id: Iffeebde4a3cb7c59e69c4c3e23ff4e02461169b6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I6a396dc7f6f899ea94f3845cffdfd49a69a860b5
|
| | |
| | |
| | |
| | | |
Change-Id: Ie4e04746501a3d9af523ed33295492f448be0e74
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The node representation in Ironic can contain a key called "configdrive"
which the value can be either a base64 string or a Swift temporary URL
(which is a secret). We need to mask that key when logging the node
representation either in Ironic or Nova driver so reusing the oslo's
mask_password() makes sense.
Change-Id: I10f9f37ff635f9a2dddfd7f7aaaac7d4fe6244b9
|
|\ \ \ \
| | |_|/
| |/| | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
Change-Id: I1293056d36ec0ee3b4617faabb1b48f1f3bcf980
Closes-Bug:#1512207
|
|/ / /
| | |
| | |
| | | |
Change-Id: I293f410f0846439ecef0255681c66976e683f33b
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The widely used mask_password() function will mask passwords in
strings using a list of keys and patterns. This change extends it to
work on dictionaries as well. This allows one to directly invoke
mask_dict_passwords() on a dictionary and this will have the
effect of masking not only the strings (values) but also mask the
values if the keys in the dictionary are part of the list of
sanitization keys.
If the dictionary contains nested dictionaries, those will be
recursively masked as well.
Change-Id: I7ebafdeb671da36e0fdc9d6983a17ac5481b6f28
Closes-Bug: 1526041
|
| | |
| | |
| | |
| | |
| | |
| | | |
use assertIsNone(val) instead of assertEqual(None, val).
Change-Id: I298d1da8838602f58f9e57b1e9c388a43c1a3b7e
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We added these two modules recently, but didn't include them in doc
index. This commit add them in doc index and add version information
about when they were added.
Change-Id: Ic3347f57a722187fc4bfe68fce6f08fba97af7fb
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We deprecated method total_seconds in 3.1, but method delta_seconds
still use it, this leads DeprecationWarnings in Nova which uses
method timeutils.delta_seconds. So don't call total_seconds in method
delta_seconds.
Change-Id: Iad3aca09f2b0c7abce8046931c4ecbc59a09e4c0
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
filter should return original elements instead of modified normal
case elements.
Change-Id: I2c190f0b9a56738f7cdcd9ed06ef04b24f6c30c3
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
test_file_with_not_existing_path_and_not_default_suffix and
test_file_with_not_existing_path have created tempory file which
share same directory tree, when run test code parallel, one might
fail because the other one has cleaned that directory.
This patch replaces constant directory name with random name.
Change-Id: If663f81bd2f09b8d07fb371bd27237044f17ee6f
Closes-Bug: #1526323
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fnmatch is not thread safe for versions <= 2.7.9. We have used
it in some projects without any lock for concurrency scenario. This patch
re-implements a thread safe fnmatch which is very similar to standard
nmatch.
Change-Id: I610ffcdf58d1590b8e0c0faefd8832563b33ab30
ref: https://bugs.python.org/issue23191
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This function is the recommended way to get information
about functions going forward, so all the variations of
getargspec can just use this instead (including the variations
of this used in openstack).
This exposes a 'get_signature' function that correctly aliases
the exposed function in python3.x and the backwards compat
library (funcsigs) that exposes this same information in python2.x
Internally in the other reflection functions we now switch
away from using getargspec as well, and replace it with using
this new signature object/function instead.
Depends-On: I1aa0054089ca57fc2d68779f4ee133a9750fec2a
Change-Id: I910b353f5db290832ef87bf7c5e5bb2e9788e3ec
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we use 'qemu-img info' command to get image info, some kinds
of image may show an 'unavailable' disk size. For example:
$qemu-img info sheepdog:volume-1af1afa0-7820-4063-9b90-4fa6161a74a9
image: sheepdog:volume-1af1afa0-7820-4063-9b90-4fa6161a74a9
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: unavailable
$qemu-img info -f rbd rbd:data/foo
image: rbd:data/foo
file format: rbd
virtual size: 10G (10737418240 bytes)
disk size: unavailable
cluster_size: 4194304
The current code didn't consider 'unavailable' size, and it will
raise a ValueError in this case. This patch fixed this bug by
adding the judgment of 'unavailable' size.
I also fixed some problems of the test case.
(This patch is a sync from cinder:
Change-Id Ic5f3b80e172baaafc07432319f8aa24bf117b392)
Change-Id: Ie64822299af5ca20f9e1961cfab386c38729444d
Closes-Bug: #1516083
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For now revert this, at a later date we can reapply
this but we need to order this a little differently to
make it work out.
This reverts commit 2abbe1c3b19490f570c29502cd56ec92daf4ca45.
Change-Id: I20f3c5804caf1af698aa0f6397a9953eb9aba829
|
| | |
| | |
| | |
| | |
| | |
| | | |
There's no need to install Babel to use this library.
Change-Id: I023a8e8e4db8cfadb1a85210ab943310827b0ab8
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Due to the typo in bandit_conf_generator (that was recently fixed
by [1]) bandit.yaml conatins the same "profiles" section twice.
[1] https://review.openstack.org/#/c/251342/
Change-Id: I45b1a74d9ec2eb859dd8235a148c2295b7859a75
|