On Mon, Jan 8, 2018 at 2:36 PM, David Davis <davidda...@redhat.com> wrote:
> How would REST API users discover the possible values for ‘operation’? I > guess we could put it in the help text for the field. > > I’m unsure of the value of having an operation param. I think I prefer the > idea of just having users supply importer or add/remove_content (but not > both) or having two separate endpoints. > > The value is that this will be a single endpoint for creating a repository version. The plugin writers will not need to add REST API endpoints when implementing a complex manipulation of content in a repository version. They will simply create a task and we'll dispatch this task when a user requests to create a new repository version using this task. > > David > > On Mon, Jan 8, 2018 at 1:45 PM, Dennis Kliban <dkli...@redhat.com> wrote: > >> Enable users to POST to /api/v3/repositories/123abc456/versions/ with >> one required parameter 'operation'. This parameter would be an identifier >> for a task Pulp would run to create a new version. Any additional >> parameters passed in by the API user would be passed along to the task. >> >> pulpcore would provide the 'sync' task and the 'add_remove' task. 'sync' >> would accept an 'importer'. 'add_remove' would accept 'remove_content' and >> 'add_content'. >> >> Each plugin could provide any number of tasks for creating a repository >> version. >> >> pulpcore would always create the new repository version, hand it to the >> plugin code, and then mark it as complete after plugin code runs >> successfully. Alleviating the plugin writer of these concern. >> >> REST API users would always use the same end point to create a repository >> version. Plugin writers wouldn't have to worry about creating repository >> versions and managing the 'complete' state. >> >> What do you all think? >> >> >> _______________________________________________ >> Pulp-dev mailing list >> Pulp-dev@redhat.com >> https://www.redhat.com/mailman/listinfo/pulp-dev >> >> >
_______________________________________________ Pulp-dev mailing list Pulp-dev@redhat.com https://www.redhat.com/mailman/listinfo/pulp-dev