[katello-devel] Modelling of environments, products, etc in Katello (related to renaming of environments)

Jan Pazdziora jpazdziora at redhat.com
Tue Aug 14 11:05:11 UTC 2012


On Tue, Aug 14, 2012 at 11:49:45AM +0100, Dmitri Dolguikh wrote:
>
> 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.

How do you propose to solve situation when you have a resource

	prod

and it gets renamed to

	prod-old

and then the admin wants to create new resource named

	prod

? Will you allow them to create that resource with this name (breaking
the expectation because the new prod content might be completely
different), or will the (now) prod-old occupy the prod name forever?

What is the difference between renaming prod to prod-old, and removing
prod and creating prod-old with the same content?

The labels are just a human readable names assigned to resources. If
the admin on the server decides that the

	prod

label should now point to different object, why stop them?

By the way, why not use a dual addressing scheme -- you can have

	id/the-UUID-or-any-other-generated-non-semantic-id

and

	label/prod

point to the same resource? Here the first will likely be used
internally and could be used by the super careful user who want to
protect from any label manipulation, and the second one would be used
by users who trust the admin and they always want to use their
production environment, no matter if it was just created from scratch
or renamed three times in the mean time.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the katello-devel mailing list