nova/nova/api/openstack/placement
Tetsuro Nakamura 8330ab4e61 Skip _exclude_nested_providers() if not nested
In rocky cycle, 'GET /allocation_candidates' started to be aware of
nested providers from microversion 1.29, namely, it can have multiple
allocations from multiple resource providers in the same tree in the
allocation requests.

To keep the behavior of microversion before 1.29, it added a filters
to exculde nested providers being unaware of the nested architecture.
However that function "_exclude_nested_providers()" is very heavy
and is executed even if there is no nested provider in the environment
when microversion < 1.29.

This patch changes it to skip it if there is no nested provider.

Since _exclude_nested_providers() should be done before limitting
the candidates, this patch also moves it from hander file to the
deeper layer.

This is manually backported from the placement repository:
commit 727fb88dccfe8461cc40ae53ca2d4e40fd2a9c3c

Change-Id: I4efdc65395e69a6d33fba927018d003cce26fa68
Closes-Bug: #1828937
2019-05-17 16:48:36 -05:00
..
handlers Skip _exclude_nested_providers() if not nested 2019-05-17 16:48:36 -05:00
objects Skip _exclude_nested_providers() if not nested 2019-05-17 16:48:36 -05:00
policies [placement] Add /reshaper handler for POST 2018-08-23 00:36:17 +00:00
schemas [placement] Add /reshaper handler for POST 2018-08-23 00:36:17 +00:00
__init__.py Add initial framing of placement API 2016-07-29 10:31:36 +00:00
auth.py Implement granular policy rules for placement 2018-05-17 11:12:16 -04:00
context.py Follow up changes to granular placement policy reviews 2018-05-26 12:54:54 -04:00
db_api.py Harden placement init under wsgi 2018-11-08 12:25:46 +00:00
deploy.py placement: ignore policy scope check failures if not enforcing scope 2018-08-10 16:29:17 +01:00
direct.py Adapter raise_exc=False by default 2018-06-22 09:40:33 -05:00
errors.py [placement] Add /reshaper handler for POST 2018-08-23 00:36:17 +00:00
exception.py [placement] Retry allocation writes server side 2018-07-31 10:57:16 +01:00
fault_wrap.py [placement] use simple FaultWrapper 2018-02-28 20:34:12 +00:00
handler.py [placement] Add /reshaper handler for POST 2018-08-23 00:36:17 +00:00
lib.py Add request_spec.RequestGroup versioned object 2018-11-05 17:47:06 -05:00
microversion.py [placement] Add /reshaper handler for POST 2018-08-23 00:36:17 +00:00
policy.py Follow up changes to granular placement policy reviews 2018-05-26 12:54:54 -04:00
requestlog.py [placement] default to accept of application/json when */* 2018-05-15 16:55:42 +01:00
resource_class_cache.py [placement] Move resource_class_cache into placement hierarchy 2018-08-03 14:55:49 +01:00
rest_api_version_history.rst [placement] Add /reshaper handler for POST 2018-08-23 00:36:17 +00:00
util.py Merge "Add placement.concurrent_udpate to generation pre-checks" 2018-08-01 12:19:49 +00:00
wsgi.py placement: Always reset conf.CONF when starting the wsgi app 2018-09-24 09:01:24 +01:00
wsgi_wrapper.py Provide framework for setting placement error codes 2018-04-14 13:45:54 +01:00