The current manual page contains hyphens where a minus sign
was intended. By default, "-" chars are interpreted as
hyphens (U+2010) by groff, not as minus signs (U+002D).
Since options to programs use minus signs (U+002D), this
means for example in UTF-8 locales that you cannot cut and
paste options, nor search for them easily.
This patch fixes this by escaping hyphens with backslashes,
and also fixes a typo: s/retreived/retrieved/.
Change-Id: If954c91eebe7b39bdac792f1f126998d2e3bcb8e
The requests 'files' parameter adds this 'Content-Type: multipart/form-data'
HTTP header and the whole multipart body data get stored with the object.
This also create a memory hog issue because files are loaded in memory before
being actually sent. This patch removes this behavior and restores what was
done before, ie: direct uploading.
This patches also fixes an issue in requests, when used with glance
CooperativeReader it mis-calculates content-length leading to chunked encoding
for raw upload.
Change-Id: Ie5b0a1078bedd33f09c6157f48b5f88116c589fa
Closes-Bug: #1280072
Closes-Bug: #1280275
In particular, this skips the "build" directory, which is prone to
containing stuff that doesn't comply with all the hacking checks. The
actual code we care about all lives in three places, so let's only
check those.
Change-Id: I4a3be59913ad85a5a9e91d254f4d3f4b0b1cc7b7
Currently, httplib implementation does not support SSL certificate
verification. This patch fixes this. Note that ssl compression parameter
and 100-continue thing is still missing from requests, though those are
lower priority.
Requests now takes care of:
* proxy configuration (get_environ_proxies),
* chunked encoding (with data generator),
* bulk uploading (with files dictionary),
* SSL certificate verification (with 'insecure' and 'cacert' parameter).
This patch have been tested with requests 1.1.0 (CentOS 6) and requests
2.2.1 (current version).
Change-Id: Ib5de962f4102d57c71ad85fd81a615362ef175dc
Closes-Bug: #1199783
DocImpact
SecurityImpact
swift has already the upload option "--changed" to upload only changed
files. This patch adds a similar feature by comparing the md5 of the
local file to the remote object etag.
When used in combination with download the MD5 hexdigest of each file
is sent with an "If-None-Match" header to skip downloading identical files.
When used in combination with upload the MD5 is compared to the remote
etag by using the already existing HEAD request.
Change-Id: I727b0456558c6a7742b2428c6d1c45c4bfaf66e9
* tox.ini: The LANG, LANGUAGE and LC_ALL environment overrides were
introduced originally during the testr migration in an attempt to be
conservative about the possibility that locale settings in the
calling environment could cause consistency problems for test runs.
In actuality, this should be unnecessary and any place where it does
cause issues ought to be considered an actual bug. Also, having
these in the configuration actively causes older pip to have
problems with non-ASCII content in some package metadata files under
Python 3, so drop it now.
Change-Id: If4e025e22248d06b77e9d4d8f4e4815776428b9d
Closes-Bug: #1277495
According to FHS 2.3 the correct place to install the manpage for a
binary in /usr/local/bin/ would be /usr/local/man/.
However, on Debian/Ubuntu-based systems /usr/local/man/ is a link to
/usr/local/share/man/ and on other systems /usr/local/man/ might not
exist at all.
Even worse, if the client is installed in /usr/bin/ the manpage
should should be installed in /usr/share/man, but will be installed
in /usr/man/ which is completely wrong.
This patch fixes this and uses share/man/man1 as common prefix. Doing
this will install the manpage either in /usr/local/share/man/man1 or
/usr/share/man/man1.
Partial-Bug: 1269715
Change-Id: I590932f00476eacd434cdae012fd62010845581d
This patch adds a capabilities option on swiftclient.
This option uses the new /info endpoint to request the
remote capabilities and nicely display it.
Change-Id: Ie34b454511d5527e402e66e1fdb72120f427f2fd
Currently the existing manpage isn't copied to /usr/local/man/man1
when installing swiftclient from source. This patch fixes this.
Change-Id: Ib2ee091d5e1d4c37a4e5a00f50fa19df44bd3c41
Partial-Bug: 1269715
xrange is not supported in python 3, so replace it with range since no
large size lists involved.
Closes-Bug: #1237717
Change-Id: I4e5e0782153d32c8beee03f7d871722ed4352859
Add parameter --object-name, which:
1) Sets target object name when upload single file
2) Sets object prefix when upload a directory
Change-Id: Idc4357c3355e66d31c100540b901e70db20b03c3
Closes-Bug: 1012979
Added a retry_on_ratelimit parameter to the Connection
class so that ratelimited requests can be retried.
DocImpact
Change-Id: I2817a7ea0ed2d69a7659e80111fbd2c91a75d530
Some positional arguments are optional but the help indicate
they are mendatory and can be confuse for an user.
swift delete <container> [object]
swift post <container> [object]
Change-Id: I7be525905b51d3ef160b0f47194e817b5cba0f9b
tox 1.6 allows us to skip the sdist step, which
is slow. This does that.
It also allows us to override the install line.
In this case, it's important as it allows us to
stop getting pre-release software we were not
asking for.
Original patch by Monty Taylor, talked about here:
http://lists.openstack.org/pipermail/openstack-dev/2013-September/015495.html
Change-Id: Id751f7d5d40a80d348a5f5936539d9462b40b14b
As far as proxies usage is concerned, keystone-client API and swift-client API behave differently because the former uses python Request library while the latter uses raw httplib. As a result, Keystone authentication honors environment variables http_proxy, https_proxy and no_proxy while Swift doesn't.
This patch, which code is mainly borrowed from Python Requests, makes Swift
data connections and Swift authentication connections behaving homogeneously.
Change-Id: Ic8a0089c35c458d7ed96e572e22429014298fe4c