--no-ssl-compression is deprecated and no longer used. So, it is
removed from the help message.
Change-Id: I2b886671a568ed191ee380cf16335ccd9ae85062
Closes-Bug: #1583919
Currently client is contacting glance service even if the
caller has niether specified any redirection nor '--file'
option. This unnecessary request although isn't causing
any critical issues but can be avoided by simply doing
input validation first.
TrivialFix
Change-Id: I841bebeda38814235079429eca0b1e5fd2f04dae
--profile argument can be loaded from OS_PROFILE environment variables
to avoid repeating --profile in client commands.
Correct/update help text.
Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: I67c1e4b859b972e380eb658c98ceae4fbef5c254
1. Update URLs according to document migration
2. Update the dead and outdated links
3. Optimize (e.g. http -> https)
Change-Id: Iad743ad223b8c40ae914beccd936f71a81622d76
https://review.openstack.org/474775 moved glance.rst from the
doc/source/man directory into doc/source/cli, so we need to adjust
the path in conf.py to avoid issues when running:
python setup.py build_sphinx -b man
Change-Id: I2c37755553d1265fb9fb069067c4468853f395b7
Fix a formatting error in one docstring and turn on the flag to ensure
that future warnings in the doc build trigger a build failure.
Change-Id: I7159b985d1690a8ae61ff885408da4623c105952
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Set some of the new config values and enable openstackdocstheme as an
extension so it will inject values into the page context as it writes
each documentation page. This ensures the pages link to the right bug
tracker, etc.
Change-Id: I316bd585f91064af4d1d1e7b834986619fc3a2d3
Depends-On: Icf3a40ed104cfd828f532f6f2b112ed02f996ff5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This patch rearranges and reformats existing content.
It replaces the home-grown autodoc feature with the one built into pbr,
for consistency with other OpenStack projects.
It depends on the doc-migration spec and a pbr feature to allow us to
specify where the autodoc content should go in the source tree during
the build.
Change-Id: I8d2bb11b5ef3e46fcd22c8bed8f84060d8ab6f03
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Depends-On: I2bd5652bb59cbd9c939931ba2e7db1b37d2b30bb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The library is used in glanceclient/common/https.py and the
documentation build for the API fails without the dependency.
Update the error handling so that when OpenSSL reports an error it is
converted to a client communication error.
Change-Id: I0c0fb3139bb848d0cbaf88ae6a767a730bea74eb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Hiding the unhandled exception in the test with a failure makes it
harder to debug the problem. Let them pass unhandled so the test reports
an ERROR instead of FAILURE.
Change-Id: I4e435a6d276fdf161dac28f08c2c7efedd1d6385
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Some of tests use different method of assertTrue(isinstance(A, B))
or assertEqual(type(A), B). The correct way is to use
assertIsInstance(A, B) provided by test tools.
Change-Id: Ibb5e5f848c5632f7c1895c47b8c1a938f2c746c3
This allows us to pass in a global_request_id in the client
constructor so that subsequent calls with this client pass that to the
servers. This enables cross project request_id tracking.
oslo spec I65de8261746b25d45e105394f4eeb95b9cb3bd42
Change-Id: Iea1e754a263a01dae5ed598fdda134394aff54b0
Downloading image with --progress fails with "RequestIdProxy object is
not an iterator". This is because to display download progress
VerboseFileWrapper in progressbar requires object of IterableWithLength,
but after support of returning request-id [1] to caller it returns
RequestIdProxy object which is wrapped around IterableWithLength
and response.
To resolve this issue overridden next and __next__ methods in
RequestIdProxy so that it can act as iterator for python 2.x
and 3.x as well.
[1] 610177a779b95f931356c1e90b05a5bffd2616b3
Closes-Bug: #1670464
Change-Id: I188e67c2487b7e4178ea246f02154bbcbc35a2b1
The bug: any existing Content-Type header cannot be found because the
call to headers.get() fails. Therefore we end up with two Content-Type
headers because a new one (applicaion/octet-stream) gets added
unconditionally. The cause: the strings (keys and values) in the headers
dict are converted from unicode sequences of type <str> to utf-8
sequences of type <bytes>. This happens in safe_encode()
(oslo_utils/encodeutils.py:66). <str> != <bytes> even if they appear to
have the same characters.
Hence, for python 3.x, _set_common_request_kwargs() adds content-type
to header even if custom content-type is set in the request.
This results in unsupported media type exception when glance client
is used with keystoneauth and python 3.x
The fix: follow the directions in encode_headers().
It says to do this just before sending the request. Honor this principle;
do not encode headers and then perform more business logic on them.
Change-Id: Idf6079b32f70bc171f5016467048e917d42f296d
Closes-bug: #1641239
Co-Authored-By: Pushkar Umaranikar <pushkar.umaranikar@intel.com>
This requests commit [1] changed the behavior when a nonexistent cacert
file is passed in: now it raises IOError. This is getting through
glanceclient.common.http.HTTPClient._request, which used to raise
CommunicationError in this scenario.
Even though there is arguably a better exception than CommunicationError
to represent this condition (like maybe IOError), for backward
compatibility this change set converts IOError to CommunicationError.
We also improve the unit test to raise the original exception if the
expected conditions aren't met; this improves debugability.
[1] 7d8b87c37f
Change-Id: I6a2cf4c6d041b67d3509153b4cef18b459263648
Closes-Bug: #1692085
Downloading image with --progress fails for python3 with,
TypeError: 'IterableWithLength' object is not an iterator. This
is because IterableWithLength class does not implemented python3
compatible __next__ method.
Added __next__ method for python3 compatibility.
Change-Id: Ic2114180fac26e9a60678f06612be733e8671bdb
Closes-Bug: #1671365