<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 7:33 PM, Matt Riedemann <span dir="ltr"><<a href="mailto:mriedem@linux.vnet.ibm.com" target="_blank">mriedem@linux.vnet.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
On 12/11/2015 1:48 PM, Sam Matzek wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
The CRUD operations for Nova volume attachments have inconsistencies<br>
between documentation and implementation.  Additionally, the read/get<br>
operation is implemented twice under different URIs.  What is Nova's<br>
direction for volume attachment APIs and how should the following<br>
discrepancies be resolved?<br>
<br>
The current state of affairs is:<br>
CREATE (volume attach) is documented twice under two different URIs: [1]<br>
and [2], but only os-volume_attachments [1] is implemented [3].<br></div></div></blockquote></blockquote><div><br></div><div>Matt, can you look a little deeper into what happened to os-volume_attachments? I'm worried we've missed one of the extensions. </div><div><br></div><div>As for the docs, I thought we put in redirects from v2 to v2.1 but I need to investigate. </div><div><br></div><div>Anne</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Attach volume as an action on the servers URI appears to have been part<br>
of the Nova V3 API, but its implementation no longer exists.<br>
Is it the future direction to have volume attach and detach done as<br>
server actions?<br>
<br>
READ is implemented twice and documented twice under two different URIs:<br>
os-volume_attachments [5] and server details [6]<br>
The two implementations do not return the same information and the only<br>
bit of information that is common between them is the volume ID.<br>
Why do we have two implementations and is one preferred over the other?<br>
Should one be deprecated and eventually removed with all enhancements<br>
going into the other?<br>
<br>
UPDATE is implemented [4] but not documented.<br>
<br>
DELETE (detach) only appears to be implemented and documented once: [7]<br>
<br>
A blueprint proposal exists [8] to enhance the attach and update APIs to<br>
set and modify the delete_on_termination flag.  The discrepancies in the<br>
create and read operations calls into question whether the update change<br>
should be on the PUT /servers API to match the server's read [6] or if<br>
the os-volume_attachments update API should be modified to line up with<br>
os-volume_attachments read.<br>
<br>
<br>
[1] <a href="http://developer.openstack.org/api-ref-compute-v2-ext.html#attachVolume" rel="noreferrer" target="_blank">http://developer.openstack.org/api-ref-compute-v2-ext.html#attachVolume</a><br>
[2] <a href="http://developer.openstack.org/api-ref-compute-v2.1.html#attach" rel="noreferrer" target="_blank">http://developer.openstack.org/api-ref-compute-v2.1.html#attach</a><br>
[3]<br>
<a href="https://ask.openstack.org/en/question/85242/the-api-action-attach-is-missing/" rel="noreferrer" target="_blank">https://ask.openstack.org/en/question/85242/the-api-action-attach-is-missing/</a><br>
[4]<br>
<a href="https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/volumes.py#L318" rel="noreferrer" target="_blank">https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/volumes.py#L318</a><br>
[5] <a href="http://developer.openstack.org/api-ref-compute-v2-ext.html#attachVolume" rel="noreferrer" target="_blank">http://developer.openstack.org/api-ref-compute-v2-ext.html#attachVolume</a><br>
[6]<br>
<a href="http://developer.openstack.org/api-ref-compute-v2.1.html#listDetailServers" rel="noreferrer" target="_blank">http://developer.openstack.org/api-ref-compute-v2.1.html#listDetailServers</a><br>
[7]<br>
<a href="http://developer.openstack.org/api-ref-compute-v2-ext.html#deleteVolumeAttachment" rel="noreferrer" target="_blank">http://developer.openstack.org/api-ref-compute-v2-ext.html#deleteVolumeAttachment</a><br>
[8]<br>
<a href="https://blueprints.launchpad.net/nova/+spec/delete-on-termination-modification" rel="noreferrer" target="_blank">https://blueprints.launchpad.net/nova/+spec/delete-on-termination-modification</a><br>
<br>
<br>
<br></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>
<br>
</blockquote>
<br>
Several of the different paths you're pointing out are v2 legacy (e.g. anything with *-v2-ext.html). Anything with v2.1 is, well, the v2.1 API and is current.<br>
<br>
The code is very similar in most cases between v2 and v2.1. The main differences with v2.1 are (1) jsonschema validation on the front-end and (2) microversion support. More info is here [1].<br>
<br>
As for docs, there are a lot of missing docs or incorrect docs in the compute API. There is an etherpad [2] on gaps to fill there, patches are welcome.<br>
<br>
[1] <a href="http://docs.openstack.org/developer/nova/#compute-api-references" rel="noreferrer" target="_blank">http://docs.openstack.org/developer/nova/#compute-api-references</a><br>
[2] <a href="https://etherpad.openstack.org/p/nova-v2.1-api-doc" rel="noreferrer" target="_blank">https://etherpad.openstack.org/p/nova-v2.1-api-doc</a><span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
<br>
Thanks,<br>
<br>
Matt Riedemann<br>
<br>
<br>
__________________________________________________________________________<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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Anne Gentle</div><div>Rackspace</div><div>Principal Engineer</div><div><a href="http://www.justwriteclick.com" target="_blank">www.justwriteclick.com</a></div></div></div>
</div></div>