[katello-devel] Merged sync status cli/api

Jason L Connor jconnor at redhat.com
Mon Aug 29 15:11:48 UTC 2011


On Mon, 2011-08-29 at 08:50 -0400, Bryan Kearney wrote:
> On 08/29/2011 04:00 AM, Tomas Strachota wrote:
> > On 29/08/11 09:07, Dmitri Dolguikh wrote:
> >> Hey Tomas,
> >>
> >> I think it would be a bit more restful if resource url mirrored the
> >> model for synchronization: We have a sync resource, which supports
> >> various types of sub-resources. I think a better way to show that would
> >> be: /sync/{repositories, products, providers}.
> >>
> >> What do you think?
> >> -d
> >>
> >
> > I was inspired by pulp's routes and thought of it as of action for the
> > repo/product/provider resources. I have no strong opinion about that. I
> > like the idea that you start new synchronization eg by route:
> >
> > POST /repositories/ID/sync/
> >
> > rather than
> >
> > POST /sync/repositories/ID/
> >
> > We have ids only for repo synces. Product and provider synces are
> > handled as list of it's repo synchronizations. We can't have any route
> > like /sync/ID/... and therefore I chose the other way.
> >
> > But I'm a rest newbie so if it breaks any of the rest-best-practices
> > rules, I have nothing against changing it;)
> >
> > T.
> 
> 
> I think best practice is to try and avoid action resources, and go with 
> the making true resources like sync. However.. at some point.. it does 
> seem to break down.
> 
> - bk

REST is kinda murky on actions. It seems to follow the pattern
of /<collection>/<individual resource>/. I'm more or less the one the
extended this idea in Pulp to:
/<collection>/<individual resource>/<action on that resource>/

I like the /repositories/<id>/sync/ better then /sync/<repository>/
because I can't think of the action 'sync' as a collection of resources.

-- 
Jason L Connor
linear on freenode #pulp
http://pulpproject.org/
RHCE: 805010912355231
GPG Fingerprint: 2048R/CC4ED7C1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/katello-devel/attachments/20110829/fc7ba30f/attachment.sig>


More information about the katello-devel mailing list