<div dir="ltr">Hey there, Goutham, thanks for replying!<div><br></div><div>I don't dispute that the services are properly returning a list of supported versions, if you request the root resource. So far, that works wonderfully.</div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">I'm speaking of </span><span style="line-height:1.5">the resource endpoint that an API client is given when it queries the keystone service catalog. We have a dump of the devstack output in our testing data here -> </span><a href="http://git.openstack.org/cgit/openstack/js-openstack-lib/tree/test/unit/helpers/data/keystone.js#n392" style="line-height:1.5">http://git.openstack.org/cgit/openstack/js-openstack-lib/tree/test/unit/helpers/data/keystone.js#n392</a></div><div><br></div><div>As you can see, some services give us tenant ID, some give us version, some give us the root resource - and there's no indication of why that is. Is it fragile? Would removing the version from the nova URI in the catalog entry itself cause other services to fail? One would think not, but if that's the case why are the versions declared explicitly in the first place?</div><div><br></div><div>Michael Krotscheck</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 8, 2016 at 10:15 AM Ravi, Goutham <<a href="mailto:Goutham.Ravi@netapp.com">Goutham.Ravi@netapp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Hi Michael,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">We discussed this at the API-WG meeting today (occurs at 16:00 UTC on Thursdays, #openstack-meeting-3). A point regarding the ‘/’ endpoint and the versions response is made in the
<a href="https://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html#version-discovery" target="_blank">
microversions guideline [1]</a>. I was testing the services you mentioned (+ manila), the results from my environment are
<a href="http://paste.openstack.org/show/569282/" target="_blank">here [2].</a> Looks like none of the services require authentication to make a request to the bare endpoint. What am I missing? One thing to note is that you included the tenant ID and /v3 in case of cinder;
why is that? <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">When instantiating a client and performing version negotiation, you may have auth details; but looks like we have some consistency among all of the projects you mentioned to not require
auth. Maybe we can add this to [1]. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Goutham<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">[1] <a href="https://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html#version-discovery" target="_blank">
https://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html#version-discovery</a>
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">[2] <a href="http://paste.openstack.org/show/569282/" target="_blank">
http://paste.openstack.org/show/569282/</a> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Michael Krotscheck <<a href="mailto:krotscheck@gmail.com" target="_blank">krotscheck@gmail.com</a>><br>
<b>Reply-To: </b>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<b>Date: </b>Tuesday, August 30, 2016 at 1:11 PM<br>
<b>To: </b>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<b>Subject: </b>[openstack-dev] [api] [devstack] [ocata] Consistent Endpoint Discovery<u></u><u></u></span></p>
</div></div></div><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hey everyone - I have a little bit of a UX request for our API developers.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">For the last week or so, I've been working on building version negotiation logic for an OpenStack SDK. The process is pretty simple:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">1- Read clouds.yaml for the keystone URL.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">2- Query keystone for the service catalog.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">3- Instantiate service instances for each discovered service.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">4- Perform version negotiation on each service.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The problem: the service endpoints registered in the catalog all behave just a little bit differently, which makes building consistent version negotiation a royal PITA. I've annotated the various behaviors from a default devstack configuration
here: <a href="http://paste.openstack.org/show/564863/" target="_blank">http://paste.openstack.org/show/564863/</a>.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">In a perfect world, every endpoint would return the same type of resource - most likely the versions resource as described in the API WG Microversions spec. It would also be nice if version negotiation can happen without requiring authentication,
the easiest path to which would be supporting the 'max_version' and 'min_version' fields in the root versions resource.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Sadly, this is my last week before I'm no longer paid to contribute to the OpenStack community, so I can't take on the responsibility of proposing something of this magnitude as an Ocata goal with only my own free time to offer. Is there
anyone willing to help push this forward?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Michael<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div></div><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div></div>
</div>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div>