[openstack-dev] Specifying Tenant-ID in Openstack REST API URLs and Quatum 2.0 APIs

Juergen Brendel (jbrendel) jbrendel at cisco.com
Thu Nov 8 19:54:10 UTC 2012


>From a purely RESTful standpoint, no tenant ID is needed as long as the
URI remains unique to the resource. So, as long as the server never
has to return different (tenant specific) things for the same URL then
we don't need a tenant ID for anything. If the remainder of the URL
is unique to a particular tenant-specific resource, that's good enough.

For example, don't let the URI "/foo/bar" return one thing for one tenant
and another for another tenant. Not good. But if that situation doesn't
occur (maybe because there's always a unique resource ID at the end of the
URI) then we don't need the tenant ID.

In general, though, I noticed that there is a lot of emphasis on various
URI patterns (what should and should not go into a URI), while ideally,
the actual pattern or content of the URI should not matter at all. Clients
should not have to know about how to construct URIs, they should just be
able to follow links to unique resources. And as long as that is the case,
who cares what's in the URI?

But I guess that's a topic for a different discussion?

Juergen


> -----Original Message-----
> From: Jay Pipes [mailto:jaypipes at gmail.com]
> Sent: Friday, November 09, 2012 8:21 AM
> To: openstack-dev at lists.openstack.org
> Subject: Re: [openstack-dev] Specifying Tenant-ID in Openstack REST API
> URLs and Quatum 2.0 APIs
> 
> On 11/02/2012 06:58 PM, Vishvananda Ishaya wrote:
> > FWIW i think tenant_id in the uri is useless and I will be proposing
> to remove it in the next version of the nova api. Glance doesn't have it
> either.
> 
> Precisely my view as well.
> 
> -jay
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list