Confirm we have auth creds before clearing preauth

If you use the API and supply only preauth values (preauthurl and
preauthtoken), and if either of these are incorrect, a non-descriptive
AttributeError will be thrown and uncaught:

 'NoneType' object has no attribute 'find'

The _retry() will fail on the first pass (getting 401), then try
to reauthenticate with non-preauth values. If those are not given,
particularly the auth url, then the urlparse() call will be supplied
None for the url in http_connection() causing the exception above.

This change makes sure that we have an auth url, user and key before
retrying authentication. Given the situation above, a '401 Unauthorized'
ClientException will now be thrown instead of the AttributeError.

Change-Id: Ie1b5bde1e8ff321aa18c0f23dbd2960d6e482236
Improve Python 3.x compatibility

Some mechancical replacement of the deprecated except x,y:
construct with except x as y, which works with any Python
version >= 2.6

Change-Id: Ic245049dc7b408a5c89b9e27dfd2bd7c08acc5b5
Switch to flake8.

Change-Id: Ib9ba1e7eed09c5a90c558a8365d0a87c3f4b5ee5
Switch to pbr for setup.

Change-Id: Ifc2efa2bd7c2f030b51494ccb471f0c3e097c5ce
Merge "Confirm we have auth creds before clearing preauth"
Add end_marker and path query parameters

Fix Bug 1175057

Change-Id: I1bf65fa7c4d99ddb03dd183fe3862df93455f501
Eradicate eventlet and fix bug lp:959221

The bug is simple: whenever swift uploads to a Swift with SSL,
it uses 100% CPU. It happens because we use HTTPSConnection from
eventlet that loops like that, while holding the interpreter lock.

Now, it could be fixed in eventlet, but let's try something more
natural: drop the eventlet's HTTP client. We do not use green
threads in the client anymore, so it's not like we need it for that.

Note that in most cases clients do not use the BufferedHTTPConnection
either, because it's only installed on Swift server nodes, not on
workstations. Get rid of that too.

bug: 959221
Change-Id: I1eb932779d4171598b3efaa043f817b9c6c995c4
do not warn about etag for slo

Change-Id: I17fa1643f28aa1cd160c2d770243875a3c4a80ee
Merge "Switch to pbr for setup."
Add .coveragerc file to show correct code coverage

Change-Id: I428d0c2587cc480a27796c5fa246b171606809e1
Merge "Add .coveragerc file to show correct code coverage"
Merge "do not warn about etag for slo"
Merge "Add end_marker and path query parameters"
Update the man page

- Add -V option
- Use uniform and correct capitalization for OpenStack Swift
- Make the example of output of stat command up-to-date
- Generally prettify the document
- Remove all trailing whitespace

Change-Id: Id3da2035851847c4bff8cec8f927d3654824bf5b
log get_auth request url instead of x-storage-url

because if the request gets a 4xx error, then the url will be None, and that's just confusing.

Change-Id: I62729364b9bd279498909dc5cd0d2a1ec5fcd70d
remove busy-wait so that swift client won't use up all CPU cycles

The current implementation uses busy-wait and checking flags to
communicate between threads. It wastes a lot of CPU powers. With
python 2.6 is required for Swift, the communication between
threads should now be using queue and signal mechanisms. This
patch removed the busy-wait loops and use queue and queue join
for threads coordination which will not consume CPU cycles if
a thread is blocked.

Change-Id: I648cd637a92a159d5c13baa83f357cee2dfe7937
Rename requires files to standard names.

Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.

Change-Id: I9c1356f22f6527be44b4b3f6a77012156ff1637b
Fixes: bug #1179008
python3: Introduce py33 to tox.ini

Introduce py33 to tox.ini to make testing with
python3 easier.

Change-Id: Ibffa28107fdf1d1ae88223d84de4a7282c7882e0
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Add option to disable SSL compression

Allows optionally disabling SSL compression. This can significantly
improve HTTPS upload/download performance in some cases -- in particular
when the object is not compressible and you have very high network
bandwidth.

Implements blueprint ssl-compression.

Change-Id: I1260055f9c2e83cdabfeb51aed11b3899bed4d55
Changed the call to set_tunnel to work in python 2.6 or python 2.7 since its name changed between versions

Change-Id: I5550049435002b42c4fea06d41549a1e7254ac02