[Pulp-dev] ergonomics of providing Pulp with lists of items

Justin Sherrill jsherril at redhat.com
Tue May 7 00:32:21 UTC 2019


To me the API is the interface to pulp, not httpie and I do not think 
you should corrupt the api to make it easier to use from httpie (I.e. 
switch to using comma separated values when json provides a method for 
specifying multiple values).

If you want to support both on the server I think that would be fine, 
but I think if usability is a concern, a more usable CLI is needed!

my two cents :)

Justin

On 5/3/19 8:48 PM, Daniel Alley wrote:
> Providing Pulp with lists of values from the command line is rather 
> unweildy.  There's a lot of unnecessary escaping going on.
>
> |http POST :24817${REPO_HREF}versions/ 
> add_content_units:="[\"$CONTENT_HREF\",\"$CONTENT_2_HREF\"]"|
> |
> |
> |http POST http://localhost:24817/pulp/api/v3/rpm/copy/ 
> source_repo=${SRC_REPO_HREF} dest_repo=${DEST_REPO_HREF} 
> types:="[\"errata\"]"|
>
> Tanya, Ina and myself thought it would be worth discussing the idea of 
> using something more ergonomic, like a comma-separated string.  This 
> would make the endpoints much easier to use manually.
>
> |http POST :24817${REPO_HREF}versions/ 
> add_content_units="$CONTENT_HREF,$CONTENT_2_HREF"|
> |
> |
> ||http POST http://localhost:24817/pulp/api/v3/rpm/copy/ 
> source_repo=${SRC_REPO_HREF} dest_repo=${DEST_REPO_HREF} types="errata"||
> |
> |
> On the other hand, we're planning to have an actual CLI, then this 
> probably isn't really an issue.  The way we're doing things now isn't 
> wrong, it's just frustrating to do from a shell.  But I don't know 
> exactly what our CLI plans are.
>
> What are your thoughts?
>
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20190506/4035d592/attachment.htm>


More information about the Pulp-dev mailing list