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
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
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
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
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
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.