A todo in the contributor/placement.rst slipped through the review
cracks and meant a bad link to 'link to spec once it merges' is in the
docs. This fixes it with the correct link to the spec.
Change-Id: I13daf9576dcb1229409826b4c4eac28c8bb1e23f
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
A recent IRC conversation [1] discussed that there are generally no tests
for the placement handler code (the wsgi methods that respond to each
URI and HTTP method). This change adds a paragraph to point out that
this is mostly intentional and that when they get complex it would
be a good idea to extract a method.
[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2018-03-28.log.html#t2018-03-28T13:00:40
Change-Id: I09774c123068e42e6a828fc37455dc5d374486b9
This udpates the placement contributor documentation to reflect the
current state of affairs. Ininitially this was just going to be an
update to reflect that the oslo versioned objects had moved. However,
while reviewing the rest of the doc it became clear there were other
issues that should be resolved. Doing so in one shot helps to maintain
the continuity of the document and doing it piecemeal means it is less
likely to happen.
Change-Id: Ia8d4861799e27a30108dd465d15828c5a1943819
This fills in the TODOs for the unit, functional and
docs part of the API contributor guide.
Since we don't rely on the DocImpact tag in the commit
message for API changes (that tag results in a nova bug
and was meant mostly for making changes to docs external
to the nova repo, which is no longer the case), this
changes that section to just talk about the in-tree docs
that should be updated for API changes.
Change-Id: I9ca423c09185d2e3733357fd47aaba82d716eea4
In the comments to I8f0c3006d1bb97d228f73256c58a79235cd12670, a request
for clarification was made on when the last-modified header should
be "now". This adds an example to help things a bit more clear.
Change-Id: I301f17bc7aad9f0037d2b13aa6e493ac9a6abb80
Add some instructions on how and when to add last-modified headers
when creating a new handler in the placement API.
Change-Id: I8f0c3006d1bb97d228f73256c58a79235cd12670
This is a follow up to change I947e927802f755ccb25a91efd82cac895779d19e
to document the decision and agreements made in that change about fixing
obvious regression bugs in admin-only APIs without a microversion.
Change-Id: I4051cb465c509db63620ee727654f7c896fab1e8
Related-Bug: #1733886
This adds some links to talks from the Sydney summit to the docs
for cells v2, bug triage, and the metadata service.
While adding a "References" section to the metadata docs, I figured
it was also useful to link to a blog post from mikal about vendordata
since it also includes code samples.
Change-Id: Ifc47a5472db37f5526004d2e00751365a026975a
The testing strategy doc was linking to the hacking repo docs
on creating unit tests, which are very specific to creating
unit tests for hacking rules.
This changes the link to the 'creating unit tests' section in
the HACKING.rst file, which has more information on testing
within nova.
Along with that change, the HACKING.rst testing section is
updated a bit to point out that we use stestr now instead of
testr and adds a proper link to the development environment
quickstart docs.
The nova/tests/unit/README.rst actually needs a lot of work,
but that's left for another day.
Change-Id: Ie5106d87d632286162b31ce132e947c306d21abd
Closes-Bug: #1732024
According to "code conventions" [1], do not use "-y" option.
Instead, use apt-get install package, yum install package,
or zypper install package.
[1] https://docs.openstack.org/doc-contrib-guide/writing-style/
code-conventions.html
Change-Id: I49c9f0d63ba08656965c632644c45a0c92d874f9
In the microversion contributor doc, refresh the checklist for creating
a new microversion.
- Remove reference to "doc team"
- Add bullet about release note
- Add bullet for updating the API reference
Change-Id: I81a8cd68792f06738ee9709d07d557a37367a806
I put out a new placement microversion [1] and initially missed updating
the API reference documentation [2]. I'd like to say it would have
helped if the checklist in the Microversion section of the contributor
doc had been up to date, except I didn't even know about that document
at the time. Anyway, this change set adds that bullet - and I'll know
to refer to it next time.
[1] https://review.openstack.org/499826
[2] https://review.openstack.org/515748
Change-Id: Id0329d9824eeb1d210defe0567286372b72cb1cf
Update doc links according to OpenStack document migration,
Use https instead of http for docs links, and update.
Change-Id: Ia4c58ffd799444b939175603bdf511622def75cc
There are some small comments on the review of
Ib2b49f70c55311195535a5ef250ff555e227fa0a
This is a follow-up for these comments.
Change-Id: I1d2d95a0864578161a34084db31eb460e895c1ec
A new patch for the microversion API change in python-novaclient side
should be submitted before the microversion change in Nova is merged.
Change-Id: Ie8868a2e767825e08ae4a2e1bfffa7b3fbfb7273
api.rst has many stale information now as we have done
many changes in api framework specially removal of
stevedore extensions loading and plain routing.
This commit modify this doc to reflect latest information
and remove v2 specific info which are no longer valid.
Note- in next part we will merge api_2.rst in this doc and
show 'adding api method' step by step.
Change-Id: I0628d8fa0b19c3fb09f1896402fc85dcae90916f
Missing from our contributor guides is documentation guidelines,
starting a page there for now especially as there are a couple of
things that emerged in the great pike import that would be good to
write down.
Part of bp: doc-migration
Change-Id: Ib2b49f70c55311195535a5ef250ff555e227fa0a
This attempts to reorganize the front page content relevant to
operators into digestable chunks, including some summaries of links to
explain to people why they might want to follow those links to learn
more.
Part of bp: doc-migration
Change-Id: I6815958b2533d462a2e5d27e7be57440d9f4f40a
Online data migrations that move something from the cell database
to the API database typically create new things in the API DB and
on a query, look in the API DB first and then fallback to the cell
database. We started supporting multiple cells in Pike, so any online
data migrations that move things to the API DB after that will need
to be multi-cell aware for the fallback lookup code.
This just adds a reminder in the code review guide.
Change-Id: If0d7d9b80e336b696aaf87ec13ac18daa1068357
In an attempt to make the main navigation sidebar not be visual mud
(and really confusing) create a reference sub page that explains all
the references.
Part of bp: doc-migration
Change-Id: I005fc24e49487631d7fe73cb498c61619bcaac9d
In order to wrangle together a top level TOC that makes sense, stop
including everything in the TOC (ideally we could convince sphinx to
not warn on that).
This creates a Contributor Documentation landing page with deep links
to all the relevant documents. It removes all those links from the
front page, and the TOC. They can be found by deep links or search,
and it is a less confusing initial experience for folks.
Part of bp: doc-migration
Change-Id: If5e7940ddd0ae3316f7475742c02abfe3df28ac4
Sub lists have to be indented exactly 2 additional spaces from their
parent, otherwise it is treated as a blockquote, which isn't what we
want.
Part of bp: doc-migration
Change-Id: Iab46b5e39e4bd0d154f33dc795f24362c77a88a5
A lot of our rst was actually misformatted with extra spaces indenting
the bullet lists. This wasn't very visually noticable in the
oslosphinx theme, but it's really bad in the new theme. There will
need to be lots of fixes here, but will do them one page at a time.
Part of bp: doc-migration
Change-Id: Ic1d1383148b005b884fdfa3e9a9658adcb13ee70