Commit Graph

13 Commits

Author SHA1 Message Date
Tony Breeds d63f1068ba Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I508d4f29aa2235155b234741452c6d596b602b65
2017-09-12 16:02:01 -06:00
PollyZ 1f6eac7c3d Convert dict headers and Webob headers into lowercase.
In the fold_headers function, if the headers behaves like a dict,
they were being retured unchanged. This would cause issues in the
later processing to extract the microversion header, which matches
on lower case strings.

Convert these headers to lowercase also provide a test case to
validate the header is being parsed correctly.

Change-Id: I8501c813d668c0a32905906e4ef3f8c6c6b12de2
Close-Bug:# 1606351
2016-07-29 13:22:36 -05:00
Chris Dent c031779d58 Fix summary information used in pypi display
Typo in summary information fixed.

Change-Id: I1cfbd2c020cac406944b5b380c9ce13d038ab343
2016-04-11 18:59:35 +01:00
Louis Taylor 4b04aaf3b2 Make service_type a positional argument
This removes the assert to ensure a value for service_type is set. The
keyword style of calling can still be used, so

    microversion_parse.get_version(headers, service_type='compute')

will remain working.

Using an assert for this is probably inadvisable, since it will be
stripped away if python is run with -O.

Change-Id: I9775c5d87890c8ff4a6072c600d54fa47264fa9f
2016-04-08 14:03:08 +01:00
Chris Dent 2f044aae4e Include README.rst content on doc index
This is so there is at least some bare bones documentation to
start from.

Change-Id: I839e574bb1b52d16bc235d0437c60cff017d4594
2016-03-31 18:07:23 +01:00
Chris Dent b1f7162324 Fix folded header checks for WebOb
WebOb uses a Mapping class for headers which behaves like a dict
but does not inherit from dict, so the isinstance check in
fold_headers was not working as expected. This is now replaced
with a check for dict-like behaviors. It's a bit of a tossup
between doing a hasattr and simply trying to access a key. I chose
the former for readability and because we don't actually want to
do anything with the value we would retrieve were access by a key
legit.

Tests are added to specfically cover the use of a
webob.headers.EnvironHeaders object, which is what headers in
Nova and Nova derivations look like.

Change-Id: I31de49bcfd8822c53d3293b106de96138eaf4464
2016-03-31 14:03:13 +01:00
Chris Dent 33e0066354 Enable gerrit, gitreview and gate testing
Initial setup for git review.

Add basic docs handling so that docs tests will pass. No
actual docs in place yet.

Align with global requirements.

Change-Id: I8ae7c2c6ce410c04f4ce53ce5278b2b85c141c93
2016-03-31 12:31:20 +01:00
Chris Dent 45916f2af1 Cleanup README
Some formatting errors.
2016-03-24 13:35:42 +00:00
Chris Dent 1214334f43 allow tox to skip missing interpreters 2016-03-24 13:28:08 +00:00
Chris Dent 615383062c package for initial release 2016-03-24 13:25:59 +00:00
Chris Dent d2c4bb7605 Change interface to explicitly pass legacy_headers
Based on suggestion from @sdague

TODO: more tests, positive and negative
2016-03-22 19:44:18 +00:00
Chris Dent 49b44934b9 Initial proof of concept of microversion_parse
See README.rst for details.

The basic gist is that a get_version method is provided. It takes a
dict or list of headers and returned a version for a service_type if
it can find it.
2016-03-22 17:48:42 +00:00
Chris Dent db6fb70f72 Initial commit 2016-03-22 15:29:38 +00:00