<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 4, 2015, at 11:03 AM, Devananda van der Veen <<a href="mailto:devananda.vdv@gmail.com" class="">devananda.vdv@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<p dir="ltr" class=""><br class="">
On Jun 4, 2015 12:00 AM, "Xu, Hejie" <<a href="mailto:hejie.xu@intel.com" class="">hejie.xu@intel.com</a>> wrote:<br class="">
><br class="">
> Hi, guys,<br class="">
>  <br class="">
> I’m working on adding Microversion into the API-WG’s guideline which make sure we have consistent Microversion behavior in the API for user.<br class="">
> The Nova and Ironic already have Microversion implementation, and as I know Magnum
<a href="https://review.openstack.org/#/c/184975/" class="">https://review.openstack.org/#/c/184975/</a> is going to implement Microversion also.<br class="">
>  <br class="">
> Hope all the projects which support( or plan to) Microversion can join the review of guideline.<br class="">
>  <br class="">
> The Mircoversion specification(this almost copy from nova-specs): <a href="https://review.openstack.org/#/c/187112" class="">
https://review.openstack.org/#/c/187112</a><br class="">
> And another guideline for when we should bump Mircoversion <a href="https://review.openstack.org/#/c/187896/" class="">
https://review.openstack.org/#/c/187896/</a><br class="">
>  <br class="">
> As I know, there already have a little different between Nova and Ironic’s implementation. Ironic return min/max version when the requested<br class="">
> version doesn’t support in server by http-headers. There isn’t such thing in nova. But that is something for version negotiation we need for nova also.<br class="">
> Sean have pointed out we should use response body instead of http headers, the body can includes error message. Really hope ironic team can take a<br class="">
> look at if you guys have compelling reason for using http headers.<br class="">
>  <br class="">
> And if we think return body instead of http headers, we probably need think about back-compatible also. Because Microversion itself isn’t versioned.<br class="">
> So I think we should keep those header for a while, does make sense?<br class="">
>  <br class="">
> Hope we have good guideline for Microversion, because we only can change Mircoversion itself by back-compatible way.<br class="">
</p>
<p dir="ltr" class="">Ironic returns the min/max/current API version in the http headers for every request.
</p>
<p dir="ltr" class="">Why would it return this information in a header on success and in the body on failure? (How would this inconsistency benefit users?)</p>
<p dir="ltr" class="">To be clear, I'm not opposed to *also* having a useful error message in the body, but while writing the client side of api versioning, parsing the range consistently from the response header is, IMO, better than requiring a conditional.</p>
</div>
</blockquote>
+1. I fully agree with Devananda on this point. Use the headers consistently, and add helpful errors into the body only as an addition to that behavior, not a substitute.</div>
<div><br class="">
</div>
<div>Adrian</div>
<div>
<blockquote type="cite" class="">
<div class="">
<p dir="ltr" class="">-Deva</p>
__________________________________________________________________________<br class="">
OpenStack Development Mailing List (not for usage questions)<br class="">
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" class="">
OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br class="">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</body>
</html>