[katello-devel] Modelling of environments, products, etc in Katello (related to renaming of environments)
Dmitri Dolguikh
dmitri at redhat.com
Tue Aug 14 10:49:45 UTC 2012
On 14/08/12 11:27 AM, Lukas Zapletal wrote:
> On Thu, Aug 09, 2012 at 01:42:44PM +0100, Dmitri Dolguikh wrote:
>>> The issue boils down to renaming of environments. If we are to use
>>> environment names for environment identification, we have to
>>> provide resolution for urls that are no longer valid (via 301).
>>> Doable, but additional work.
>> Additional work would include support for 301 responses on clients too.
>>
> But why would we need 301 responses? I mean, once you rename, the thing
> is done. Users are using CLI to interact with the backend, CLI takes
> care of translating labels/names to IDs. This is transparent to the
> users.
>
The original resource still exists, only its location has changed. Since
we cannot know how API clients use resource urls, how long they keep
them around, etc, we either: have to return the resource, its new
location, or notify the user that the resource in question has been
deleted. That is the reason why http response codes differentiate
between "not found" (404) and "permanently moved" (301).
Think how many times you followed a link and got a 404, only to discover
later that it still exists, but at a different URL? Let's not contribute
to this problem.
Katello cli is only one of the clients of our API. Please keep in mind
that a generic Katello API client is a piece of software that may or may
not interact with its users, or what information it persists locally.
-d
PS> on API design: (there was a video somewhere around too):
http://www.infoq.com/articles/API-Design-Joshua-Bloch/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/katello-devel/attachments/20120814/0f9fe0b0/attachment.htm>
More information about the katello-devel
mailing list