placement/releasenotes/notes
Chris Dent 8a3e7c5a95 Provide framework for setting placement error codes
The API-sig has a guideline[1] for including error codes in error
responses to help distinguish errors with the same status code
from one another. This change provides a simplest-thing-that-could-
possibly-work solution to make that go.

This solution comes about after a few different constraints and attempts:

* We would prefer to go on using the existing webob.exc exceptions, not
  make subclasses.
* We already have a special wrapper around our wsgi apps to deal with
  setting the json_error_formatter.
* Though webob allows custom Request and Response objects, it uses the
  default Response object as the parent of the HTTP exceptions.
* The Response object accepts kwargs, but only if they can be associated
  with known attributes on the class. Since we can't subclass...
* The json_error_formatter method is not passed the raw exception, but
  it does get the current WSGI environ
* The webob.exc classes take a 'comment' kwarg that is not used, but
  is also not passed to the json_error_formatter.

Therefore, when we raise an exception, we can set 'comment' to a code
and then assign that comment to a well known field in the environ and if
that environ is set in json_error_formatter, we can set 'code' in the
output.

This is done in a new microversion, 1.23. Every response gets a default
code 'placement.undefined_code' from 1.23 on. Future development will
add specific codes where required. This change adds a stub code for
inventory in use when doing a PUT to .../inventories but the name
may need improvement.

[1] http://specs.openstack.org/openstack/api-wg/guidelines/errors.html

Implements blueprint placement-api-error-handling

Change-Id: I9a833aa35d474caa35e640bbad6c436a3b16ac5e
2018-04-14 13:45:54 +01:00
..
add-aggregate-type-extra-specs-affinity-filter-79a2d3ee152b8ecd.yaml Fix reno reverts that are still shown 2016-03-16 15:03:01 +01:00
aggregate-uuid-generation-1f029af7a9af519b.yaml Allocate uuids for aggregates as they are created or loaded 2016-02-24 07:48:09 -08:00
aggregates-moved-to-api-database-e1bd30909aaf79d3.yaml Aggregate create and destroy work against API db 2016-08-01 08:22:08 -07:00
allocation_candidates_support_member_of-92f7e1440ed63fe7.yaml Add 'member_of' param to GET /allocation_candidates 2018-03-16 16:32:02 +00:00
allocation-candidates-limit-37fe5c2ce57daf7f.yaml [placement] Enable limiting GET /allocation_candidates 2017-12-20 20:08:39 +00:00
allocation-candidates-traits-1adf079ed0c6563c.yaml Fix nits in support traits changes 2018-01-31 11:07:07 -05:00
bp-symmetric-allocations-6ff7b270c32dcb7d.yaml [placement] Fix GET PUT /allocations nits 2017-11-28 12:25:13 +00:00
bug-1732000-log-options-6db2cc8c747145ca.yaml Log options at debug when starting API services under wsgi 2018-01-31 15:45:27 +00:00
delete-inventories-placement-api-13582910371308c4.yaml DELETE all inventory for a resource provider 2017-03-20 14:00:33 +00:00
idempotent-put-resource-class-dc7a267c823b7995.yaml [placement] Idempotent PUT /resource_classes/{name} 2017-04-20 15:51:37 +00:00
placement-aggregate-generation-9dad79fb0356fcc0.yaml placement: generation in provider aggregate APIs 2018-03-14 17:08:52 -05:00
placement-allocation-candidates-1114a843755b93c4.yaml placement: support GET /allocation_candidates 2017-07-03 10:57:59 -04:00
placement-allocations-link-in-get-resource-providers-0b1d26a264eceb4b.yaml Include /resource_providers/uuid/allocations link 2017-10-23 14:08:05 -05:00
placement-api-endpoint-interface-set-29af8b9400ce7775.yaml Cleanup some issues with CONF.placement.os_interface 2017-02-13 17:13:14 -05:00
placement-api-member-of-d8a08d0d0c5700d7.yaml HTTP interface for resource providers by aggregates 2017-01-05 20:26:18 +00:00
placement-cors-c7a83e8c63787736.yaml Add rudimentary CORS support to placement API 2017-01-16 12:04:24 +00:00
placement-error-code-fcbbf5d45560984e.yaml Provide framework for setting placement error codes 2018-04-14 13:45:54 +01:00
placement-forbidden-traits-ace037856aa29a09.yaml [placement] Support forbidden traits in API 2018-04-13 19:24:08 +01:00
placement-generation-from-create-provider-203a0ac1ebfe64d9.yaml placement: Return new provider from POST /rps 2018-03-14 17:08:55 -05:00
placement-last-modified-cf43aece4c54fc97.yaml Qualify the Placement 1.15 release note 2018-01-08 21:13:08 -05:00
placement-required-traits-on-list-resource-providers-fab11cdb36cd3502.yaml rp: GET /resource_providers?required=<traits> 2018-02-23 12:08:32 -06:00
placement-rest-api-filter-providers-by-resources-0ab51c9766fe654f.yaml Expose a REST API for a specific list of RPs 2017-01-13 17:57:29 -05:00
placement-rest-api-nested-resource-providers-552a923a96d7adca.yaml placement: adds REST API for nested providers 2017-12-06 10:48:09 -06:00
placement-rest-custom-resource-classes-a3f2175772983b0a.yaml Fix some release notes in preparation for the o-2 beta release 2016-12-15 00:06:01 +00:00
placement-traits-api-efa17d46ea1b616b.yaml placement: Add Traits API to placement service 2017-04-11 10:31:37 +08:00
post-allocations-427581fa41671820.yaml [placement] POST /allocations to set allocations for >1 consumers 2017-11-28 12:15:53 +00:00
return-uuid-attribute-for-aggregates-70d9f733f86fb1a3.yaml Return uuid attribute for aggregates 2017-01-05 14:32:43 -05:00
tenant_aggregate_placement_filter-c2fed8889f43b6e3.yaml Documentation for tenant isolation with placement 2018-03-29 11:56:39 -07:00