We pass *encoded* headers to log_curl_request, but then compare them to
*unencoded* sensitive headers that must be redacted (basically comparing
bytes to strings). This means no header is ever redacted.
Store sensitive headers as bytes rather than strings to fix this issue.
Change-Id: I06785704750e8c4b23d1276514949655e6dcb7ab
Closes-Bug: #2051712
The built-in json module is available in recent Python 3 versions so
this fallback is not at all used.
Change-Id: I7b24fd1e107b6bed7322faecdd04ff9d3336d761
requests-mock removed the old compatibility code in 1.12.0[1] and now
usage of a bare dict for response header causes AttributeError.
[1] e3bd0d1a92
Closes-Bug: #2064011
Change-Id: Iee86fa3eae86102112987b8648ada73d37ac58e8
The stable/xena branch has been deleted, so reno can't find its
release notes. Use the xena-eom tag to indicate the end of the
Glance project's maintenance of the Xena series.
This strategy is consistent with the way we handled stable/yoga and
was agreed upon at the 8 Feb Glance meeting:
https://meetings.opendev.org/meetings/glance/2024/glance.2024-02-08-14.00.log.html#l-58
Change-Id: I3473a36a473767531c19463611d3eddb1a676998
The stable/wallaby branch has been deleted, so reno can't find its
release notes. Use the wallaby-eom tag to indicate the end of the
Glance project's maintenance of the Wallaby series.
This strategy is consistent with the way we handled stable/yoga and
was agreed upon at the 8 Feb Glance meeting:
https://meetings.opendev.org/meetings/glance/2024/glance.2024-02-08-14.00.log.html#l-58
Change-Id: I1869021ca2117bd74f13e49c0f76967f3ef42c65
The stable/victoria branch has been deleted, so reno can't find its
release notes. Use the victoria-eom tag to indicate the end of the
Glance project's maintenance of the Victoria series.
This strategy is consistent with the way we handled stable/yoga and
was agreed upon at the 8 Feb Glance meeting:
https://meetings.opendev.org/meetings/glance/2024/glance.2024-02-08-14.00.log.html#l-58
Change-Id: Ib1f22dc701d090e8540aefd995903af143a34594
Add file to the reno documentation build to show release notes for
stable/2024.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.
Sem-Ver: feature
Change-Id: I9856860976200d82384a39c16484167c1a774506
The stable/yoga branch has been deleted, so reno can't find its
release notes. Use the yoga-eom tag to indicate the end of the
Glance project's maintenance of the Yoga series.
This strategy was agreed upon at the 8 Feb Glance meeting:
https://meetings.opendev.org/meetings/glance/2024/glance.2024-02-08-14.00.log.html#l-58
Change-Id: I604c960eb0b2614efc39d5b5508b15abc8f9d0f2
Since REMOTE SERVICE INTERFACE has default value to 'public',
it doesn't make sense to have validation for the same.
Removing this validation and added few missing tests for
glance-download import method
Closes-Bug: #2051761
Change-Id: I89adf23aac5db4f2c46379546def2f71d7c8e163
As per the current release tested runtime, we test
till python 3.11 so updating the same in python
classifier in setup.cfg
Change-Id: I83a7f6bb7a2069e221e6c8efee31886defcaa93a
Add file to the reno documentation build to show release notes for
stable/2023.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.
Sem-Ver: feature
Change-Id: I1d1f147333a10f0a526df83ad88b9cff56020cc3
Currently, tox-edocs fails with the following error message:
Warning, treated as error:
autodoc: failed to import module 'shell' from module 'glanceclient'; the
following exception was raised:
No module named 'six'
We used to install six in the virtual environment through keystoneauth,
but keystoneauth no longer depends on six. Let's mock six completely in
the context of autodoc.
Change-Id: Ibcf0b9698227a2c22fe991b7516ba5dceabfc607
The chunk size used for downloading images was 64KiB for some time. That
is okay for relatively small images but the client side of CPU can be a
bottleneck especially for large images. Bump the default chunk size from
64KiB to 1MiB so we can use the client side CPU more efficiently.
[64KiB chunk size - current]
INFO cinder.image.image_utils Image download 1907.35 MB at 68.61 MB/s
-> ~ 549 Mbps
[1MiB chunk size - patched]
INFO cinder.image.image_utils Image download 1907.35 MB at 132.10 MB/s
-> 1,057 Mbps
Closes-Bug: #2020139
Change-Id: I8b6e19621fc989526b02319d88fcfde88a17eee0
In do_image_import, gc.images.image_import may be called from two
different places, depending on the command used ("glance image-import"
or "glance image-create-via-import"). Make sure we always pass the
remote_* arguments to gc.images.import.
Change-Id: I76c6ea00523d93bad900776866de6ba22bc516b4
Partial-Bug: #2012442
This option causes the installation of the "glance" command to fail in
the functional tests. We have removed it from glance and glance_store in
the past to improve compatibility with tox>=4.0, so let us do the same
in glanceclient.
Change-Id: Ia5bf8d5f90e9cd98adc65c3fa80ce4c87eebad9c
The argparse module automatically replaces '-' characters with '_'
characters when converting an option string to an attribute:
«For optional argument actions, the value of dest is normally inferred
from the option strings. ArgumentParser generates the value of dest by
taking the first long option string and stripping away the initial --
string. If no long option strings were supplied, dest will be derived
from the first short option string by stripping the initial - character.
Any internal - characters will be converted to _ characters to make sure
the string is a valid attribute name.»[1]
This means that the value of the "--remote-region" option of the
"image-import" command will be available as "args.remote_region";
"remote-region" would not be a valid attribute anyway.
We make sure to retrieve the proper value for the following
options: --remote-region, --remote-image-id and
--remote-service-interface.
[1] https://docs.python.org/3/library/argparse.html#dest
Change-Id: I1d8c69acd5d61fdc426469cd87d1ace81871e60f
Partial-Bug: #2012442
Add file to the reno documentation build to show release notes for
stable/2023.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.
Sem-Ver: feature
Change-Id: I4e1a0a7c870e51909aebdc16d02b0062554de49a
First, fix test_help(). A commit[1], which first appeared in Python
3.10, changes the output of the help feature of argparse. Options used
to be in a section named "Optional arguments:", and they are now in a
section named "Options:".
Second, tox 4 changes the behaviour of tox, and
{toxinidir}/requirements.txt is no longer installed automagically in the
docs virtual environment. This causes autodoc to fail on some imports.
We explicitely add {toxinidir}/requirements.txt to the list of
dependencies to fix this issue.
These issues should be fixed in separate patches, but since they both
block the CI, they depend on each other.
[1] https://github.com/python/cpython/pull/23858
Change-Id: Ia7866390b31f469bdea95624325a13aaf45a496e
Closes-Bug: #2002566
Boolean options (such as "--protected" for glance md-namespace-update)
should accept a limited amount of valid values, rather than assuming an
"invalid" value means "False".
The following values (no matter the case) will now be interpreted as
True: ‘t’,’true’, ‘on’, ‘y’, ‘yes’, or ‘1’.
The following values (no matter the case) will now be interpreted as
False: ‘f’, ‘false’, ‘off’, ‘n’, ‘no’, or ‘0’.
Change-Id: I0e7942045d883ac398bab4a7a85f2b4ac9b1ed8c
Closes-Bug: #1607317
The value of DEFAULT_PAGE_SIZE (20) was hardcoded in multiple places in
the tests, which means all the tests would break should we ever want to
change that value.
Co-Authored-By: 韩春蕾 <1922361860@qq.com>
Change-Id: I6e8dbae32c3a24d3fbeebcea5bfe0dd9ae247035
This commit:
- removes the old "u" prefix from all strings
- removes the unicode_key_value_to_string function
Change-Id: I1da347e31e828fd2359f0935a4da47257116d4cb