Commit Graph

189 Commits

Author SHA1 Message Date
Monty Taylor 31f6575ce4 Add guidelines on Version Discovery
As an expansion of the guidelines around microversions, add guidelines
around how services should expose Version Discovery documents. This
includes recommendations for putting unversioned endpoints into the
catalog.

It also includes a completely new thought, so feel free to punch me in
the head - that versioned discovery documents should include a
collections rel link to allow clients to get from the versioned to the
universioned document without having to do URL manipulation. If we can
get that in, it should serve as a bridge for those clouds that are still
putting versioned endpoints into the catalog for a while for backwards
compat reasons.

Two related follow-up patches are in-work. One that adds a copy of the
consuming-discovery document with all of the extra effort in support of
clouds and services that to not implement these guidelines removed, so a
"perfect future state" is easy to read. The other is a document
recommending a global cloud "profile" that greatly reduces the API
burden on clients consuming this information.

Change-Id: Id8160048dfffc1ada32ce876a65b02fb7a02306e
2020-06-02 13:29:09 -05:00
Monty Taylor e809580088 Add document describing consuming version discovery
The next patch actually describes desired state of version discovery.
But in an epic amount of cart-before-the-horse, we have the process for
consuming the discovery already because the process must take in to account
the present as well as the past. This process has kept in mind what consuming
the recommended discovery process _wants_ to look like in the future and in
calls that out in a few places. The intent would be that the algorithm here
would work for all clouds, but that as clouds and services adopt API-SIG
recommendations, the interactions with the clouds would become more
efficient. (so for clients using the complete algorithm they should be
upwards compatible with forthcoming API-SIG guidelines and will just
naturally do less work over time).

I believe this is consistent in defaults, fallbacks and error conditions with
what is currently implemented in keystoneauth, although there is
additional logic presented here which is not yet in keystoneauth. The
intent is for the process presented here to not change the behavior
experienced by current keystoneauth users, with the exception that when
the complete algorithm is implemented it's possible that an additional
API call may be made on older clouds. That is to say, keystoneauth
should not need to make any incompatible changes, but may need to add
some features to be a fully compliant implementation.

Apologies for the size and complexity. It turns out there are many
historical oddities still lurking out there and advice to client
authors that does not take them in to account would be incomplete. On
the other hand, as we drive guidelines forward into being implemented,
the need for this much crazy logic should go away.

Co-Authored-By: Dmitry Tantsur <divius.inside@gmail.com>
Change-Id: I241f76bca8ac27fc3d27028ae284b9012a2da7e9
2020-06-02 13:23:43 -05:00
Dmitry Tantsur 3abffb4fd7 Use doc8 to verify rst instead of custom tests
Fix a disproportionally long line in dns-sd.

Change-Id: I9137ce1780e971824bffdd4e6557ddeb44c4db0b
2020-03-19 11:43:16 +01:00
wangfaxin e30aee5906 Fix wrong openstack review link .
Change-Id: I7bcdc10d9e64f96c8320fc1246d07ba92c24dce2
2019-11-20 10:15:20 +08:00
Zuul 634f9a3ea4 Merge "Update to opendev" 2019-09-04 15:59:00 +00:00
Le Hou 28289b4a00 Update to opendev
Change-Id: Icde84212c7008532a97a70fd9f8f768bae0e049b
2019-04-23 13:36:57 +08:00
Dmitry Tantsur a5a353ced4 Add guideline on DNS-based service discovery
Change-Id: Ia7e136318a9b41b9492a9ee31ff56ddea80732fc
2019-04-09 15:55:54 +00:00
Dmitry Tantsur 2ef2b12a82 Repair building guidelines
The recent yasfb is not compatible with ancient sphinx, just bump
both requirements, as well as replace deprecated oslosphinx with
openstackdocstheme (requirements shamelessly copied from ironic-specs).
While we're here, uncap pbr and bump it to 1.0.

Change-Id: Ia78499827a53f5ee0c7a8b0d9951a0e37dedc91b
2019-04-09 15:55:33 +00:00
Zuul 6cff138b8b Merge "Update the URL in doc" 2019-02-14 16:28:46 +00:00
zhouxinyong 4cb70b4b8b fix some errors for ill-syntax in testing.rst
Change-Id: Ifad024184c40a6e3d1fcb36988e42d564ed0ce93
2018-11-13 10:15:34 +08:00
melissaml 39a6ebcf40 Update the URL in doc
Change-Id: I15ea0a591ab9dce5f15b9ef9bcce5f6cac9ff4bd
2018-09-23 23:18:24 +08:00
Zuul 0e7f1ae100 Merge "Expand schema for error.codes to reflect reality" 2018-07-26 16:28:52 +00:00
Zuul 8563aebd2a Merge "Add links to errors-example.json" 2018-07-26 16:28:50 +00:00
Chris Dent 348f499ff5 Expand schema for error.codes to reflect reality
Add '_' as a valid character in error.codes, because that's what's
present in the wild.

The schema is updated to include a pattern check, and one of the
examples is changed to demonstrate the use of the new char.

Change-Id: I6bcfd5d411b2b9c540546f92859647333114a8f8
2018-07-06 16:44:41 +01:00
Chris Dent 777732d9c4 Add links to errors-example.json
They've been TODO for a long time. The provided links are
examples only, but include advice that services should publish
their own error code documentation.

Change-Id: I8e80160abc51ace34e8e286defc9ebe6a7847d54
Story: 1593321
Task: 22178
2018-07-01 18:36:09 +01:00
Chris Dent 8aff4a0149 Expand error code document to expect clarity
Based on conversation in IRC http://p.anticdent.org/282V , update
the errors guideline to be more specific about:

* using specific codes for specific cases
* adding errors is okay and not a breaking-change

Change-Id: I473918ce9c6b49c0b904e93b7140421525f4e7c0
2018-07-01 18:28:45 +01:00
chenjiao ff8fbbf3a9 spelling error
the word verison should be verision

Change-Id: Ib118345a14cdf3174be7b6dc9a4ce889561416e0
2018-06-17 14:26:49 +08:00
XiaojueGuan 028d37d986 Trivial: update url to new url
Change-Id: I3f5bd7b97787031cb79a8c30c39703a016e2d239
2018-05-13 21:25:46 +08:00
Zuul e7644e98f5 Merge "Add guidance on needing cache-control headers" 2018-04-26 16:24:24 +00:00
Chris Dent b585c8485d Add guidance on needing cache-control headers
This adds some practical guidance to the existing section on caching
to make it clear that where responses are not making explicit
assertions about controlling cache, they MUST "cache-control: no-cache"

Change-Id: If13a5a19ff077cd9a2c9c400c24af70ea6f818d9
Closes-Bug: #1747935
2018-04-12 21:47:22 +01:00
Chris Dent f094748e92 Update the errors guidance to use service-type for code
Also, explain a bit about why errors exist and how the code
can be used.

Change-Id: Idcb4d11f7ff9867dfe29b47dcfd9774ed269ab3e
Closes-Bug: #1756464
2018-04-12 20:36:46 +00:00
Ed Leafe f0651255f8 Break up the HTTP guideline into smaller documents
The current HTTP guideline is very, very large. It will be more easily
discovered and consumed by breaking it up into logical chunks.

Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Change-Id: I964b1f31e50c93f59e5dc07d7643c6c21b51f762
2018-04-05 15:38:28 +02:00
Zuul fbd6d9abcc Merge "Add guideline on exposing microversions in SDKs" 2018-03-29 16:48:37 +00:00
Chris Dent dffcfe99f3 Correct header on time based filtering
Something must have changed somewhere in the docs jobs
which made an error show up in the gate where the header
in question had the wrong nesting.

Interestingly, this had apparently impacted the publishing
job, making it so the published page hasn't had the new
content. For months:

http://specs.openstack.org/openstack/api-wg/guidelines/pagination_filter_sort.html#filtering

Change-Id: Ifb86989f37425513f75558b2e15ab12460a7cc61
2018-03-21 14:28:40 +00:00
Dmitry Tantsur b0903d3b0e Add guideline on exposing microversions in SDKs
Change-Id: I69651d9df572bb33ea4fb413c57a4c3d15c98d7e
2018-03-15 15:55:54 +01:00
Zuul c2575d58be Merge "Expand note about rfc5988 link header" 2018-01-18 16:28:07 +00:00
Monty Taylor 4b569b5e4d
Expand note about rfc5988 link header
An alternate that is suggested for people who cannot add link sections
to the response body is the RFC 5988 Link header.

Move it to its own section for ease of linking, and change the text from
'can consider' to 'should'.

Also, add a note about API breakage and versioning related to adding
Link headers.

Change-Id: Ide4124513e3328084c53a2122384a4e25ea6c863
2018-01-08 15:52:57 -06:00
Ed Leafe 9fd03c71c7 Change API-WG to API-SIG
This updates as many references to 'API-WG', 'API Working Group', etc.,
to reflect the name change to the API-SIG.

Change-Id: I15ca0860c58bd7ba51f08dd39e551a774d7a060a
2017-10-12 18:07:33 +00:00
Chris Dent 090ee277c2 Explain, simply, why extensions are bad
This tries to keep it as simple as possible and refrains from going into
history or examples, because it's not clear if any of that is relevant
beyond the interop concern.

Change-Id: Iae9f93ab73e17a626858641d2528f7a7c03c80b2
Closes-Bug: #1593331
Closes-Bug: #1593330
Closes-Bug: #1593328
2017-09-07 16:35:55 +00:00
Jenkins e9be2965b2 Merge "Update compatibility doc and references" 2017-08-03 16:50:16 +00:00
Eric Fried 8b16c92912 Fix service-types-authority schema URL and typos
In the consuming-catalog spec:
- Correct the URL pointing to the schema for service-types.json
- Minor typographical fixups

Change-Id: I4b5b81c64e55a16d05923da447d1c9544aea99b8
2017-07-27 16:08:05 +00:00
Chris Dent 6cfa7550dd Update compatibility doc and references
The compatibility doc was out of date and making promises of having
additional information that is now provided by the interoperability
document. So we now link from compatibility to api_interoperability and
in discoverability where we had been linking to compatibility we now
link to the recent information on consuming the catalog.

Change-Id: I296d5b167ffad63a256a2b133ee9250710e2837b
Closes-Bug: #1593312
2017-07-26 17:20:31 +01:00
Jenkins b41c616210 Merge "Fix missing close bracket" 2017-06-29 16:24:11 +00:00
EdLeafe f263956447 Fix missing close bracket
Just a simple typo fix.

Change-Id: Iaec5e2d69f78116d0394a6212a4cf0173d8ba5c0
2017-06-28 18:34:18 +00:00
Jim Rollenhagen af592a079f Microversions: add next_min_version field in version body
This adds a "next_min_version" field in the versions body returned by
the root endpoint for a service using microversions. This gives a clear
signal to clients that the minimum supported microversion is going to
change. It also adds a "not_before" field that guarantees the that the
current minimum version will be supported up to that date, giving
consumers a sense of how quickly they need to update their programs.

Co-Authored-By: Ed Leafe <ed@leafe.com>

Change-Id: Ib717221ce6d162e3efca822a5a6b0a7ac689d7b0
2017-06-16 17:05:02 +00:00
Jenkins 028d6012ab Merge "Describe the publication of service-types-authority data" 2017-06-15 16:17:03 +00:00
Jenkins 8e3e7afba5 Merge "Add support for historical service type aliases" 2017-06-15 16:16:58 +00:00
Jenkins fa4d5f739d Merge "Add guideline about consuming endpoints from catalog" 2017-06-15 16:16:17 +00:00
Monty Taylor c1bb3f23d2
Describe the publication of service-types-authority data
The service-types-authority data is the canonical description of the
service type names and their aliases, but it needs to be consumable if
it's to be the basis of API consumption processes.

Describe how we publish the data so that consumers can depend on it.

Change-Id: I88a2fe2e20252f91a44bcfedbcff9e5acbe049bc
2017-06-02 08:23:45 -05:00
Monty Taylor 3b9125f1a4
Add support for historical service type aliases
There are a few services that have widely used service-types that
do not match the current recommendation from the Service Types
Authority. The process for consuming service information from the
catalog is incomplete without taking those into account.

Change-Id: I30e1392a06531844e1247bbf3d616a24be934baa
2017-06-02 08:19:37 -05:00
Monty Taylor 258e48c306
Add guideline about consuming endpoints from catalog
Having gone all the way down the rabbit hole... there is nowhere that
actually describes how to select an endpoint from the catalog. This is
just a description of today and matches what keystoneauth is doing.

There are a couple of places where the process described isn't perfect.
For instance, at the end of endpoint selection we just pick the first
from the list if there are still multiple. While that's not _great_ -
it's keystoneauth's current behavior and changing it to be an error
condition would break many many things. So while an attempt has been
made to make this forward compatible with a completely sane future,
there are a few places where, for historical reasons, we need to keep a
non-optimal behavior. They're noted within.

Change-Id: Ie36e8802eff01a846dd6f0d73a5a656856f5ca7d
2017-06-02 08:19:32 -05:00
Jenkins cc78247fef Merge "Create a set of api interoperability guidelines" 2017-05-04 16:13:27 +00:00
Jenkins 2046994507 Merge "Recommend the correct HTTP method for tags" 2017-04-27 16:52:22 +00:00
Jenkins 9cb7607028 Merge "Define pagination guidelines" 2017-04-27 16:52:16 +00:00
Chris Dent 6eef12125a Create a set of api interoperability guidelines
A new tag has been proposed in governance (see
I34cdfe0e00cd29d816e94668ace2146d66734814 ) which asserts that a
project follows OpenStack guidelines for an API maintaining
compatibility over time. The original "Evaluating API Changes"
guideline is used as the reference for what compatibility means.

That guideline was copied from the wiki in May 2015 and the content
that had been on the wiki last saw substantive change in August of
2012[1]. Under review it was discovered the guidance insufficiently
robust in a situation where the primary goal is for there to be
interoperability between clouds.

A new set of guidelines on what signifies change or instability in an API
is created in this document, with a new name, and with greater context on
the reasoning. The old document has been updated to link to this new
one with an explanation for why.

[1] https://wiki.openstack.org/w/index.php?title=APIChangeGuidelines&action=history

Change-Id: I0063c892cb1bddcca0745cd9f16b5004ff57959a
2017-04-27 17:20:46 +01:00
Jenkins 7bfc3f3706 Merge "Remove reference to nova on version discovery" 2017-04-12 09:16:38 +00:00
EdLeafe c233a69297 Define pagination guidelines
Co-Authored-By: Ron De Rose <ronald.de.rose@intel.com>
Co-Authored-By: Ian Cordasco <graffatcolmingov@gmail.com>

Change-Id: I0daac580155e98555a3775de4cb3923d519df503
2017-04-07 14:31:58 +00:00
Chris Dent 098ca4a622 Remove reference to nova on version discovery
The example does not exactly match what is returned by nova (which
does not use max_version) so remove the statement asserting that it
does.

Change-Id: I76475263ed495f7ca367c8b29b0872073c1846e3
2017-04-05 20:09:57 +01:00
EdLeafe 3ec748370d Recommend the correct HTTP method for tags
The existing guideline recommends to do a GET on a tag to check its
existence, while our HTTP guideline recommends HEAD for such checks.
Since this is just a check, we should recommend HEAD in this case.
Wording was also added to the HTTP guideline stating that in all cases
where HEAD is implemented, the corresponding GET must be implemented,
too.

Closes-Bug #1677360

Change-Id: I36045e84e906dfbdf60c8989e2a5a5fb39b7cc34
2017-04-04 13:13:45 +00:00
Ken'ichi Ohmichi ddc2f166dd Clarify the meaning of BODY
http.rst contains "HAS BODY?", but it is not so clear that it means
a request body or a response body. On the bug report 1677360, we said
HEAD can be used as low-cost version of GET by none response body.
On the table, both of HEAD and GET is NO on "HAS BODY?". So the column
means a request body. This patch makes the meaning clear.

Change-Id: Idbfc6185ffe33774ce89a591cb034288e0953a36
Related-Bug: #1677360
2017-03-29 14:00:54 -07:00