<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 11/13/2012 04:19 AM, Zane Bitter
wrote:<br>
</div>
<blockquote cite="mid:50A1138A.7070607@redhat.com" type="cite"><br>
Currently:
<br>
/{tenant_id}<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>stacks<span
class="moz-txt-tag">/</span></i>{name}
<br>
redirects to:
<br>
/{tenant_id}<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>stacks<span
class="moz-txt-tag">/</span></i>{name}/{uuid}
<br>
<br>
One option would be to change it so that e.g.
<br>
<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>tenants<span
class="moz-txt-tag">/</span></i>{tenant_id}<i
class="moz-txt-slash"><span class="moz-txt-tag">/</span>stacks<span
class="moz-txt-tag">/</span></i>{name}
<br>
redirects to:
<br>
<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>stacks<span
class="moz-txt-tag">/</span></i>{uuid}
<br>
<br>
That does solve one problem - namely that it's nicer to work with
stacks by name, but client libraries in OpenStack have
traditionally referenced such things only by ID so it's good to be
able to find the stack in a single step starting with only the
UUID.
<br>
<br>
However it would mean that "GET /stacks" would either need a query
parameter to specify the tenant id or it would have to redirect to
"<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>tenants<span
class="moz-txt-tag">/</span></i>{tenant_id}/stacks". As noted
below, it also means we'd miss out on being able to look up the
endpoint complete with tenant_id from the Keystone service
catalog.
<br>
<br>
Thoughts?
</blockquote>
<br>
Jay makes a good point though. This option is now growing on me.<br>
<br>
/stacks?tenant_id={tenant_id}<br>
/stacks/{uuid}<br>
/stacks/{name}?tenant_id={tenant_id}<br>
<br>
And yes, clients will have to figure out their tenant_id. Although
for heat they could probably safely add it as a parameter to every
request.<br>
</body>
</html>