<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 03/12/2018 10:28 AM, Jeff Ortel
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:75534e48-c313-9b79-055f-6b0d1ba29b96@redhat.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
On 03/08/2018 10:13 AM, Austin Macdonald wrote:<br>
<blockquote type="cite"
cite="mid:CA+Kyt=ooCh2q7VgjQysEK9dh+VRtGktiXNN29A-PGX47LpUO-A@mail.gmail.com">
<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. <br>
</div>
</div>
</blockquote>
<br>
+1, The git/ostree "remote" concept applies very well to most of
what an "importer" defines in pulp.<br>
<br>
<blockquote type="cite"
cite="mid:CA+Kyt=ooCh2q7VgjQysEK9dh+VRtGktiXNN29A-PGX47LpUO-A@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>-------------------------------------------------------</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>
</div>
</blockquote>
<br>
I, as a user, don't like having to specify download_policy &
sync_mode on every request. The burden on the user to passing
these consistently seems unnecessary and prone to error. And,
like something that pulp should store as part of it's value
proposition. Imagine an organization with tons of repositories
and admins. They would need to maintain a spreadsheet, notes,
scripts for these settings so that admin A is syncing using the
same settings as admin B.<br>
<br>
Perhaps download_policy & sync_mode should be attributes of
the repository. Thoughts on moving them there. The sync_mode
(mirror/additive) may need to be renamed in a way that changes it
from describing how the importer is syning to something that
defines the type of repository. Like that the repository is
intended to be a mirror or not. Perhaps just a "mirror" (bool)
attribute.<br>
</blockquote>
<br>
I have reconsidered this. Disregard.<br>
<br>
<blockquote type="cite"
cite="mid:75534e48-c313-9b79-055f-6b0d1ba29b96@redhat.com">
<blockquote type="cite"
cite="mid:CA+Kyt=ooCh2q7VgjQysEK9dh+VRtGktiXNN29A-PGX47LpUO-A@mail.gmail.com">
<div dir="ltr">
<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>
<br class="gmail-Apple-interchange-newline">
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pulp-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pulp-dev@redhat.com" moz-do-not-send="true">Pulp-dev@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/pulp-dev" moz-do-not-send="true">https://www.redhat.com/mailman/listinfo/pulp-dev</a>
</pre>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>