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: I3ca69746ffe73b7c01c3066476589fac8e16a5e9
The previous behavior in keystoneauth for constructing an unversioned
endpoint if there's a versioned endpoint in the catalog would result in
a trailing slash. Ensure that we end up with trailing slashses on
endpoints we construct.
On the other hand, do not add trailing slashes to urls we're actually
using. If someone wants a / the url they register with the catalog, they
can put one there.
Change-Id: I2798216b5b93d49fd5d3d865193cc0be6a1f6f0d
Closes-Bug: #1705770
Among the zillion permutations being tested, there was no test case for
discovery URLs lacking a path component (e.g. 'http://foo:123' as
opposed to 'http://foo:123/v2'). A new discovery code path was indexing
the second-to-last part of the path component, resulting in IndexError
when the discovery data contained a pathless URL.
This change set fixes the IndexError and adds unit test coverage for
pathless URLs in discovery data.
Change-Id: I990a24ea32d0f7123566053046c80e48bce0536b
Partial-Bug: #1705770
Add note regarding dependencies (oslo)
to ensure oslo requirements and other
similar requirements are not added to
keystoneauth.
Change-Id: Ifedf1ed8ac3130b699d14208524612aed999949d
The previous microversion patch had some review comments from samuel and
colleen that this addresses. Also, add a release note.
Change-Id: Id83643ee5a00abc5134a88dfa5bc8ddb4f5a247a
There's some ongoing concern about exactly how discover.version_between
should work. Since it's new, make it private initially in the release
to give us time to work it out.
Change-Id: I349423f1b3da74b139f5fec838597c9a824ba571
We're discouraging the use of the ambiguous and difficult-to-understand
'version' parameter in new discovery methods, instead encouraging the
use of min_version and max_version.
In order to make it possible to get the same functionality, though, we
need a way to say the same thing as version="M.m", which actually means,
"min version is M.m, and max version is the latest within major version
M".
Introducing 'latest' syntax, which can be used in various ways,
including:
min_version='2.3', max_version='2.latest'
...which is equivalent to the old school version='2.3'
Change-Id: Ife842333e25c33e54bbae4c1adb101014cb8e8db
The user now has the ability to know what microversions are available,
but needs to be able to send a microversion header with their request.
Add a microversion parameter to Session that will construct and send the
header. The microversion header requires a service_type. One should be
available but it's possible for it to be missing if someone is using an
endpoint_override. Provide a parameter to let the user specify a
service_type for the microversion call in such cases.
Change-Id: I63cdd67701749630228f9496eda82b3c8747a608
Version number for keystoneauth is still being debated. Remove this
as it's not strictly necessary anyway. The deprecation explanation is
also very clunky. Fix it.
Change-Id: I2cd39c5c01995b3e6cf22616c5343d8e1c4ce43b
In a previous change [0] when warning-is-error was added, the
sphinx todo extension was causing errors with duplicate
registration. However with the recent changes between pbr and
sphinx, this extension no longer throws a duplicate error when
using warning-is-error and we can add it back in.
[0] https://review.openstack.org/#/c/439797/
Change-Id: I2c3c44015f5b961c56360f44b52c56629760de43
The API-WG just approved the spec for version discovery documents to
optionally provide "next_min_version" and "not_before" information.
http://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html#version-discovery
The intended use of these is to communicate that at a point in the
future the service plans to raise the minimum microversion. It can't say
when that will happen, as a service does not know when deployers will
decide to upgrade their services. But it can communicate the earliest
date it's possible to happen, which would be the first date the service
itself would raise the minimum.
This can be used to emit warnings to users who are using a microversion
less than the next_min_version and to tell them how long they have to
think about it.
Currently keystoneauth will not consume these for that purpose. This
patch is merely about collecting the information from the discovery
document if it is there so a consumer can take action on it if they
wish.
Change-Id: Ibc404ef55eeae721a0d1d16e4e3e51ad77b5a75c
get_endpoint_data on an adapater is intended to return the endpoint_data
for the endpoint the adapter is mounted to, so passing in additional
kwargs doesn't make any sense. What's more, the interaction between the
existing values and the passed in values is hard to reason about.
Update the docs on using get_endpoint_data to highlight this.
Change-Id: I851c615407bc3e22af4350a4facf8488fa9c7945
interface can take a list of values now, so needs to be exposed as such
for config file consumption.
Since this is a new option we can be stricter. Add checking to make sure
only public, internal and admin can be passed as values.
Change-Id: I17043cd93072bbfd1389d44935bcf9a653e1d6a0
They should be here as an Adapter is essentially a codified
endpoint_filter.
Add them to the conf options for Adapter, since that is how Adapters get
defined in services which is one of the reasons for doing all of this
work.
Change-Id: I8c6613bac09f28169e903b303c7330b1e90fe72d
People get confused with major version discovery vs. microversion usage.
Try to make it very clear what's going on.
Change-Id: I2be8670998f531ee4777876413979a63279a59ab
Make Discover.version_data a little more lenient in the JSON data it
accepts with respect to "max_version" and "version". Previously, if the
"max_version" field was present but empty, the "version" field would be
ignored, even if populated with a proper version number. This goes
against the intent of the API. This change causes version_data to
ignore a blank "max_version" if "version" is populated.
This change also introduces a unit test harness for the various
permutations of version_data translating input version data to
min/max_microversion, including cases for the above.
Change-Id: I1cb4ebdd57a6eadc1a16efc0fc1ceeda640f26c2
Closes-Bug: #1703438
Remove some unused variables.
Remove a couple of unused parameters from private method
EndpointData._run_discovery.
Fix some formatting issues to reclaim a line or two, or because my IDE
flags them.
Change-Id: Idcc1f1e4dc6068125ea30ce0ab482a99a9e0b1cc
Fix an edge case where discover.normalize_version_number could return a
one-member tuple rather than the expected >=2-member tuple.
Fix up the docstring for the same, including the above behavior.
Change-Id: Ibe54da05705846e47063f8fc639b31df773bed9d
Closes-Bug: #1703414
EndpointData._run_discovery thought it was caching already-tried URLs,
but it was really caching each letter of each URL, so the cache wasn't
working:
tried = set()
...
if vers_url in tried:
continue
tried.update(vers_url) # Adds each char of `vers_url` to `tried`
Changed that last line to:
tried.add(vers_url)
Added a unit test for same.
Change-Id: I894636d846de4a3b63000f9e2f79f378134c1de8
Closes-Bug: #1703447
Remove unused `authenticated` kwarg from as-yet-unreleased public API
EndpointData.get_versioned_data, and private method
EndpointData._set_version_info.
Change-Id: I03a9969df4586c79b6b63d44fcb5474dd94e6ba2
Closes-Bug: #1703446
Flesh out docstrings for the following in discover.py:
- get_version_data
- version_to_string
- Discover.version_data
- EndpointData._get_version_discover_hack
and keystoneauth1.fixture.discovery.MicroversionDiscovery
Change-Id: I0358a86b13c8a9d2179d5bbf66a7ded7e6c777d1
Due to latest change in docs the old urls don't work and cause
gate failures. Fix it to reflect the new locations.
Depends-On: I7e170275fd422345505b7282b52899d08c7a4172
Change-Id: I2a4fc6a4782a5496b2ab4a8355ed2c3b6dac58fa
Remove four unneeded things in unit tests, updated a docstring,
and changed TypeError to ValueError.
Change-Id: Iad43ab2afa3767739ef3137b2691875520d052b3