Commit Graph

6 Commits

Author SHA1 Message Date
Lance Bragstad 87a39635eb Convert policy API to flask
Migrate the policy APIs to use flask-native dispatching.

Change-Id: I03fc72b19e85df711b213c1fe47b30b3f9f91d6c
Partial-Bug: #1776504
2018-08-31 07:14:32 +00:00
Morgan Fainberg 56d9c30f8f Convert endpoints api to flask native dispatching
Convert endpoints api to flask native dispatching.

Change-Id: I684e6117dc7fdd535f2ae530d44e6d5088624793
Partial-Bug: #1776504
2018-08-13 20:06:20 +00:00
Lance Bragstad 88d840e3ce Use keystone.common.provider_api for endpoint_policy APIs
This change converts the usage of self.<provider_api> to
keystone.common.providers_api.ProviderAPIs.<provider_api> in manager
and controller logic. This is the correct way to reference
providers from other managers and controllers now that dependency
injection has been eliminated.

Change-Id: Ic38ee0128b6a5a486ab9854c4e331d6df62c5cb9
2017-12-27 16:56:49 +00:00
Morgan Fainberg 81f9fe6fed Remove Dependency Injection
Refactors all of keystone's dependency injection to maintain a
single centralized repository of instantiated objects. This
means that we are no longer having to resolve order. All
objects that need to reference the various manager APIs simply
do so via the __getattr__ built into the Manager common object
or the ProviderAPIMixin object.

This is also the first step towards correcting our tests to
where they cannot run "load_backends" multiple times.

This forces any/all managers to properly run super()
as the way to register the api is via __init__.

This eliminates all use of the @dependency.requires and
@dependency.provides decorators, simplifying the objects
all around.

Any instantiations of a Manager after keystone is running
will now generate an error, ensuring everything for keystone
is running before handling requests. An exception is for
CLI and CLI tests, as the CLI may directly instantiate
managers and will not lock the registry.

Change-Id: I4ba17855efd797c0db9f4824936b49e4bff54b6a
2017-12-13 10:59:39 -08:00
Jamie Lennox da6ea7e224 Pass a request to controllers instead of a context
Instead of the unformed context dictionary pass a full request object
with access to the context_dict so that existing functions still work.
After this we can replace smaller usages of the context dict with
functions and properties on the request directly.

Change-Id: Ibe822ed7c76a24a7d31d98ce62f873a01e5fb213
2016-06-08 14:56:52 +10:00
Jamie Lennox 696c1569e8 Move endpoint policy into keystone core
Remove endpoint_policy as an extension and move it to a core resource.
For now we leave the database migrations in the extension directory
until we have a general policy for merging these into core.

DocImpact: You should no longer run the migrations for this extension.
Implements: bp replace-extensions
Change-Id: I6215b7df497c142a5e73b62543e0d76458c85f64
2015-05-25 15:27:08 +08:00