<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/10/2012 03:09 PM, Dolph Mathews
wrote:<br>
</div>
<blockquote
cite="mid:CAC=h7gUXw5NDBGETHBSxM4WATY1FH4zrSNEBfBPkfnNZ1Vv41A@mail.gmail.com"
type="cite">I don't think anyone is suggesting to completely
remove tenant ID's from URLs across OpenStack; I think Juergen
Brendel summarized it really well: "<span
style="font-family:arial,sans-serif;font-size:13px">From a
purely RESTful standpoint, no tenant ID is needed as long as
the </span><span
style="font-family:arial,sans-serif;font-size:13px">URI remains
unique to the resource."</span></blockquote>
<br>
We're still designing v1 of the Heat REST API so we have a chance of
getting it right the first time. I'd like to use this thread to get
some advice.<br>
<br>
We've just switched our stack ID from an incrementing integer to a
UUID. Each stack also has a user assigned name which is unique
within the tenant.<br>
<br>
Currently our list and show URLs are:<br>
/{tenant_id}/stacks<br>
/{tenant_id}/stacks/{name}/{id}<br>
<br>
Now that we use UUIDs we can do the following for show:<br>
/{tenant_id}/stacks/{uuid}<br>
<br>
However this thread suggests we need just enough in the URI to make
it uniquely map to content, which would make our list and show:<br>
/{tenant_id}/stacks<br>
/stacks/{uuid}<br>
<br>
This would make the client more complex. Right now the endpoint from
Keystone has the tenant ID, so all REST URLs just append to that. It
seems more error-prone to leave it up to the client to know when to
prepend the tenant ID.<br>
<br>
As a nice to have feature, our CLI should also be able to do
operations on a stack name as well as a uuid. Looking at quantum
(whose REST API is completely absent from api.openstack.org btw ;)
their client maps from name->uuid by:<br>
- check to see if the identifier matches a uuid pattern, and if not<br>
- uuid = GET /{tenant_id}/stacks?name={identifier}&fields=id<br>
- /{tenant_id}/stacks/{uuid}...<br>
<br>
cheers<br>
</body>
</html>