<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 6, 2019 at 11:48 AM Justin Sherrill <<a href="mailto:jsherril@redhat.com">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><br>
    </p>
    <div class="gmail-m_3703394124191555375moz-cite-prefix">On 4/4/19 2:35 PM, Daniel Alley wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Content copy between repositories is critically important
          to Katello integration and is something that we have not
          really addressed yet.  It also needs to be completed before
          the RPM plugin can begin work on depsolving.  The story that
          results from this discussion should probably be put on one of
          the next 1-3 sprints and not wait any longer than that.</div>
        <div><br>
        </div>
        <div>Repositories are generic to all types of content, but copy
          operations between repositories will need type-specific
          options defined by the plugin for e.g. advanced copy w/
          depsolving.  Therefore we need to find a design for this
          functionality where it will make sense that makes sense from a
          usage perspective and an implementation perspective.</div>
        <div><br>
        </div>
        <div>To get this discussion started, here's some suggestions
          about how this could work from the user perspective (presented
          without much thought put into how it would be implemented).</div>
        <div><br>
        </div>
        Create a "Copier" object, like a Remote, that stores it's own
        settings and has one or many endpoints (like "/sync/") that can
        be POSTed to and return a task and create a new repository
        version.<br>
        <div>
          <div><br>
          </div>
          <div style="margin-left:40px">POST
            /pulp/v3/api/copiers/rpm/$endpoint_name/
            content_units=[...]  [more params...]<br>
          </div>
          <div style="margin-left:40px"><br>
          </div>
          The copier would store settings such as "recursive" and the
          "source" and "destination" repositories.  And let's say they
          can be overriden.<br>
        </div>
        <div>
          <div style="margin-left:40px"><br>
          </div>
          Or, create new endpoints without any associated DB models,
          like one-shot upload does:</div>
        <div><br>
        </div>
        <div style="margin-left:40px">variant 1:  POST
          /pulp/v3/api/content/rpm/packages/copy/ content_units=[...]
          source="..." destination="..."  [more params...]</div>
        <div style="margin-left:40px"><br>
        </div>
        <div style="margin-left:40px">variant 2: POST 
          /pulp/v3/api/copy/rpm/package/ content_units=[...]
          source="..." destination="..."  [more params...]</div>
        <div style="margin-left:40px"><br>
        </div>
        <div>
          <div>Since basic copy support (just copying the units, no
            depsolving, etc.) could in theory be implemented completely
            generically, it would be nice if we could provide that for
            free somehow.  But I don't immediately see a way of doing
            so.</div>
          <div><br>
          </div>
          <div>I welcome any suggestions or input.<br>
          </div>
        </div>
      </div>
    </blockquote>
    <p>A 'copier' object that has to be CRUD'd seems like unnecessary
      complication from a user perspective.  I would go with the 'one
      shot approach' at first, i think most users are going to desire
      that over an actual object.</p></div></blockquote><div>The one shot also makes more sense to me. It has fewer steps for the user to take. I also don't see a generic version that core could offer to make this easier for plugin writers than it is today. <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>Justin<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="gmail-m_3703394124191555375mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_3703394124191555375moz-quote-pre">_______________________________________________
Pulp-dev mailing list
<a class="gmail-m_3703394124191555375moz-txt-link-abbreviated" href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a>
<a class="gmail-m_3703394124191555375moz-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></div>