The Service Types Authority has grown support for aliases, and the
os-service-types library exposes the data. Add support for matching
known aliases when matching endpoints for a user.
Change-Id: Ie90c265cb17905981d877abfaaa52354a3e63692
While writing an SDK patch, I accidentaly sent a tuple for interface and
things went boom. We already accept a list, so go ahead and accept
tuples and sets too.
Change-Id: I4b14792c7eda4e489c53fdc95e40bde14a61c052
The loop variable service_type masks the parameter service_type. It's
not a problem in this patch, but becomes a redefinition in the next
patch. It's pulled out here to not mix concerns.
Change-Id: I489d7ecad3f38b15eaa71449461cdd83782bac7a
The positional decorator results in poorly maintainable code in
a misguided effort to emulate python3's key-word-arg only notation
and functionality. This patch removes keysteonauth's dependance
on the positional decorator.
Change-Id: I20106345747860365cd0203ba1b33a2900e045b9
Sometimes, especially in places like service-to-service defaults, it's
very helpful to express a list of values. For instance, when thinking
about nova connecting to ironic, nova would like to have the default
value of "interface" be ['internal', 'public'] - which is to say, use
internal if it's there, but otherwise use public. This use case is covered
in the API-WG specs on discoverability.
Change-Id: I9102155c2d4ef1ef8bbb1d0fa26a5b5838108a4c
For the new EndpointData object, in the (admittedly uncommon) case where
the user is not providing an interface and the catalog is v2, the user
would wind up with an EndpointData with no url or interface, rather than
an EndpointData for each v2 endpoint_type found with url and interface
set properly.
This normalizes into v3 format so that the construction and be
straightforward, and introduces a denormalize used in the
ServiceCatalogV2 to re-combine the entries into the format expected by
V2 users of get_endpoints().
Change-Id: Ieb77880917e8efdf436b635aea1679c98a314404
The existing version discovery process is awesome, but in the normal flows it
ultimately returns urls, not the full endpoint data, so it's not
possible to know what version was discovered.
Make an EndpointData object that gets created and plumb that through the
stack so that it's possible to request EndpointData instead of just
endpoints. The existing discovery logic is unchanged, and the existing
methods continue to return the data they returned before.
Change-Id: Id48861e7d6d20be16f61cb375a21bca4a43a2500
The parameter was called 'endpoint_type' in keystoneclient. Moving to
keystoneauth1 the parameter was renamed to 'interface'. Updated the
docstring in service_catalog to reflect that.
Change-Id: Iedbc77ec7a856653ffc9e0282d4ce97da36c3c87
The positional library was spun directly out of what keystoneauth1 was
using so this is a fairly trivial change.
Change-Id: I7931ed1547d2a05e2d248bc3240a576dc68a0a40
Previously, there were a string of commits to keystone that addresed ignored
hacking checks. This commit does the same for H405 in keystoneauth. This
also modifies our tox.ini so that we no longer ignore H405 violations.
Change-Id: I0ac1165f309edd486639e2729c18330b1d062eb3
Closes-Bug: 1482773
There are cases, such as os_auth in ansible, where a user wants to
be able to get at the raw catalog content. This is often extremely
useful when debugging cloud applications.
Change-Id: Ibe51b5f1a4b1d93efb6076b5f97b0fd10376cd16
We've been trying to move people onto using interface rather than
endpoint_type for a while as interface is what is talked about in all
the API docs and is what is exposed by the clients.
Rename all occurrences of endpoint_type with interface.
Change-Id: If18d8e27e499c294cb4dc94521da843341287362
The standard reason to search the catalog is that you want to know how
to find a particular service type. However with service_id and
endpoint_id you may not want to specify a service_type.
Allow searching for a url without specifying a service_type.
Change-Id: I038fe5b0e04b689f1072db659219639d5193f558
endpoint_id and service_id are parts of both the v2 and v3 tokens. We
should allow finding urls for them in the same way as other attributes.
Change-Id: I22b5f4bd44e9a493017de89e14a705699df24280
The ServiceCatalog and ServiceProviders should not really be needed in a
standalone sense. They are there to make it easier to work with an
AccessInfo. Therefore move all of this into a standalone access module.
Change-Id: Idc6856d89c2131855657d01114cc72372b3b11f4