Only run flake8 on Swift code

In particular, this skips the "build" directory, which is prone to
containing third-party stuff that doesn't comply with all the various
hacking/flake8/pep8 checks.

Change-Id: Ibe2240d8c6ca5947b2cac259cd7d0a1154f8a9cd
Range requests not working with sub_SLOs

Change-Id: I618c06e7f9251bfc7049c9dc6df66e539b90d9a9
Add "If-None-Match: *" support to PUT

A common pattern that we see clients do is send a HEAD request before a
PUT to see if it exists.  This can slow things down quite a bit
especially since 404s on HEAD are currently a bit expensive.

This change will allow a client to include a "If-None-Match: *" header
with a PUT request.  In combination with "Expect: 100-Continue" this
allows the server to return that it already has a copy of the object
before any data is sent.

I attempted to also include etag support with the If-None-Match header,
but that turned up having too many hairy edge cases, so was left as a
future excercise.

DocImpact

Change-Id: I94e3754923dbe5faba065719c7a9afa9969652dd
AssertEquals is deprecated, use assertEqual partI

assertEquals is deprecated in Python 2.7, need drop it.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Change-Id: Ieec505887f740b99b11ef40878ba3ee7247b78a8
Closes-Bug: #1285040
Merge "Only run flake8 on Swift code"
Relocate DATADIR to backends

It simply makes sense that the definition of DATADIR belongs to
backends. After all, some of them may not even have any.

Coincidentially, a few unnecessary imports are dropped.

By the way, on the object server side, diskfile.py provides DATADIR
in the same way already.

Change-Id: I60bfd522c77c4a0ee13697a2e31141777c7e2398
Only fetch a timestamp when needed

While it seems free to just call time.time() whenever it is
convenient, in many cases code has to decide on a particular timestamp
as a reference point for decisions. In other places, it just seems
like a waste to make two calls that one would assume would return
nearly identical times; however, certain test environments are
notoriously overloaded (which is arguably a good thing, added stress
to the code) where back-to-back calls to time.time() might produce
timestamps seconds or even minutes apart.

These simple changes here pick a point of reference for the operation
to use throughout.

Change-Id: Id2c0ffcc7f4ffafff61ebf59a8baeb079fd0c2b8
Merge "AssertEquals is deprecated, use assertEqual partI"
Merge "Relocate DATADIR to backends"
Merge "Range requests not working with sub_SLOs"
Merge "Add "If-None-Match: *" support to PUT"
Rework use of constraints to ease testing

Prior to this patch both mainline code and testing modules imported
and used constraints directly into their own namespace, or relied on
the namespace of other modules that were not the constraints
module. This meant that if a unit test wanted to change a constraint
for its operation, it had to know how that module was using the
constraint, instead of referencing the constraint module itself.

This patch unifies the use of constraints so that all constraints are
referenced via the constraints module. In turn, this allows a test to
leverage the re-loadable nature of the constraints in the constraints
module.

It addition, a number of functional tests where using the default
values for constraints, instead of the configured value discovered in
a test.conf or in an existing swift.conf. This patch removes those
direct references in favor of the load_constraint() method from the
test/functional/tests.py module.

Change-Id: Ia5313d653c667dd9ca800786de59b59334c34eaa
Only change collation for functional tests

The unconditional module-level change of the locale collation can
affect other tests run under nose. To avoid this, make the change at
the package level, and restore it when finished.

Change-Id: Iacda42aa7155f1cfa7d0dcadbf73b961dfb4b923
Clean up swift-{account, container}-info

Reuse common code; add unit tests; ensured coverage was at 100%.

Change-Id: Id6fcc7cb07fd178e00d43968e3e2cc03226fdc05
updates for 1.13.1 release

Change-Id: I9a84c476e8d370c3a5dbc24db77a7258d521013f
Merge "Clean up swift-{account, container}-info"
Merge "Rework use of constraints to ease testing"
Merge "Only change collation for functional tests"