<div dir="ltr">Justin said it all very well. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 7, 2019 at 8:55 AM Brian Bouterse <<a href="mailto:bbouters@redhat.com">bbouters@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I was initially in favor of adopting the comma separated change, but reading @jsherril's response (which I agree with) I think straightened my thinking out. I think we should continue the escaping as is. We shouldn't change the API structure to support easier manual URL forming at the expense of better structured API calls.<br></div><div><br></div><div>To share a vision w.r.t a CLI, I think we're going to have a lot of tools built on top of the API which will cause most users to not experience a cumbersome URL forming experience we are discussing. In the very near-term in lieu of a CLI users should use the bindings (python and ruby pre-built; other languages manual build). I also think we'll see several "workflow tools" created, probably on top of the Python bindings. A python dev could probably make an interesting CLI with the click library and the python bindings in an afternoon. My hope is that we can see what happens as users start writing scripts. We could invite them to ship their scripts in a contrib CLI library that we publish on PyPI, or they could be cannibalized into the start of an official CLI (at some point).</div><div><br></div><div>Other input is welcome! What do you think we should do?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 6, 2019 at 8:33 PM Justin Sherrill <<a href="mailto:jsherril@redhat.com" target="_blank">jsherril@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>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).  <br>
    </p>
    <p>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!</p>
    <p>my two cents :)</p>
    <p>Justin<br>
    </p>
    <div class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704moz-cite-prefix">On 5/3/19 8:48 PM, Daniel Alley wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Providing Pulp with lists of values from the command line
          is rather unweildy.  There's a lot of unnecessary escaping
          going on.<br>
        </div>
        <div><br>
        </div>
        <div><code>http POST :24817${REPO_HREF}versions/
            add_content_units:="[\"$CONTENT_HREF\",\"$CONTENT_2_HREF\"]"</code></div>
        <div><code><br>
          </code></div>
        <div><code><span class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704gmail-blob-code-inner gmail-m_-5235736234529376274gmail-m_-3939432543055774704gmail-blob-code-marker"><span class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704gmail-pl-c1">http
                POST <a href="http://localhost:24817/pulp/api/v3/rpm/copy/" target="_blank">http://localhost:24817/pulp/api/v3/rpm/copy/</a>
                source_repo=${SRC_REPO_HREF} dest_repo=${DEST_REPO_HREF}
                types:="[\"errata\"]"</span></span></code></div>
        <div><br>
        </div>
        <div>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.</div>
        <div><br>
        </div>
        <div><code>http POST :24817${REPO_HREF}versions/
            add_content_units="$CONTENT_HREF,$CONTENT_2_HREF"</code></div>
        <div><code><br>
          </code></div>
        <div><code><code><span class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704gmail-blob-code-inner gmail-m_-5235736234529376274gmail-m_-3939432543055774704gmail-blob-code-marker"><span class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704gmail-pl-c1">http
                  POST <a href="http://localhost:24817/pulp/api/v3/rpm/copy/" target="_blank">http://localhost:24817/pulp/api/v3/rpm/copy/</a>
                  source_repo=${SRC_REPO_HREF}
                  dest_repo=${DEST_REPO_HREF} types="errata"</span></span></code></code></div>
        <div><code><br>
          </code></div>
        <div>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.</div>
        <div><br>
        </div>
        <div>What are your thoughts?<br>
        </div>
      </div>
      <br>
      <fieldset class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704moz-quote-pre">_______________________________________________
Pulp-dev mailing list
<a class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704moz-txt-link-abbreviated" href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a>
<a class="gmail-m_-5235736234529376274gmail-m_-3939432543055774704moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/pulp-dev" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>