<div dir="ltr">+1 +1<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 9, 2018 at 3:28 PM, Brian Bouterse <span dir="ltr"><<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I left some responses inline.<br><div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Mar 8, 2018 at 11:13 AM, Austin Macdonald <span dir="ltr"><<a href="mailto:austin@redhat.com" target="_blank">austin@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Motivation:<div>The name "importer" carries some inaccurate implications. </div><div>1) Importers should "import". Tasks like "sync" will do the actual importing. The object only holds the configuration that happens to be used by sync tasks. </div><div>2) Sync tasks on mirror mode remove content as well as add it, so "import" isn't quite right.</div><div><br></div><div>Proposed name: Remote</div><div><br></div><div>The inspiration for remote is "git remote". In git, remotes represent external repositories, which is almost exactly what our importers do. </div></div></blockquote><div><br></div></span><div>I'm +0 thinking that either name is fine but that those unfamiliar with git, but those familiar with git would benefit from the name change.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>------------------------------<wbr>-------------------------</div><div>Part 2: Trim the fields</div><div><br></div><div>Currently, Importers have settings that can be categorized in 2 ways. I am proposing removing the "sync settings" from the Remote model:</div><div><br></div><div>External Source information</div><div>    name<br></div><div><div>    feed_url</div><div>    validate</div><div>    ssl_ca_certificate</div><div>    ssl_client_certificate</div><div>    ssl_client_key</div><div>    ssl_validation</div><div>    proxy_url</div><div>    username</div><div>    password</div><div><br></div><div>Sync settings</div><div>    download_policy</div><div>    sync_mode</div><div><br></div><div>This had some advantages when Importers were related to Repositories. For example, having a repository.importer that always used the same sync mode made sense. However, the "how" to sync settings don't make much sense when importers and repositories are not linked. It seems very reasonable that a user might have 2 repositories that sync from the same source (ex EPEL). It does not make sense for them to have create an Importer for the EPEL repository twice or more just to change sync_mode or download policy. Instead of modeling these fields, I propose that they should POST body parameters.</div><div><br></div><div>example</div><div>   </div><div>POST v3/remotes/1234/sync/ repositorty=myrepo_href sync_mode=additive, dl_policy=immediate</div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">POST v3/remotes/1234/sync/ repositorty=myother_href sync_mode=mirror, dl_policy=deferred </div></div></div></div></blockquote><div><br></div></span><div>+1 to this change. I think this makes sense to specify the sync_mode and dl_policy with sync params with each download because the Importer having one policy apply to any repo that uses it does not make much sense.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><br class="m_-2528822895878418914m_4039995817265156470gmail-Apple-interchange-newline"></div></div></div>
<br>______________________________<wbr>_________________<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<wbr>/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div>