<div dir="ltr">I've updated the issue <a href="https://pulp.plan.io/issues/3472">https://pulp.plan.io/issues/3472</a> to reflect the current consensus. <div><br></div><div>However, I have some other points I'd like to discuss before we move on.</div><div><br></div><div><b>Implied endpoint:</b></div><div>v3/content/ansible/roles/ implies that there is a v3/content/ansible/. Even though this does not exist, it could, but it is a little awkward.</div><div><br></div><div>Implent v3/content/ansible/:</div><div><ol><li>Create a model viewset and serializer for the ansible level:</li><ol><li>class AnsibleContent(core.plugin.models.Content)</li><li>class AnsibleContentSerializer(core.plugin.serializers.ContentSerializer)</li><li>class AnsibleContentViewSet(core.plugin.viewsets.ContentViewSet)</li><ol><li>endpoint = "ansible"</li></ol></ol><li>Make the Role model, VS, and Serializer inherit from the AnsibleContent Model, VS, and Serializer</li></ol><div>The end result is that v3/content/ansible/ will return all Ansible content units, including Roles. v3/content/ansible/roles/ will only return Roles.</div></div><div><br></div><div><b>Publishers and Remotes</b></div><div>The above workflow makes sense and is useful if there are multiple units, but for the File plugin, this pattern adds an endpoint and 3 classes to the Content. If we want to be consistent and apply this to Remotes and Publishers, this is 3 useless endpoints and 9 extra classes. (These classes are simple, even if they are extraneous, conceptually)</div><div><br></div><div><b>IMO</b></div><div>I think we should document all of this in the plugin docs. For single type (and single remote, and single publisher) plugins, it will make more sense not to add an extra namespace. If we document how to add the extra namespace and when/why plugins should, that will be sufficient. Promoting consistency over simplicity in this case seems too far.</div><div><br></div><div><b>Or...</b></div><div>We could alter the Master/Detail code. I only have vague ideas about how to do this, but Master/Detail would essentially become Master/Plugin/Detail. This seems "right", but there isn't as much gain here as you might think. If we did it this, plugins would be required to namespace, and would be still be required to make all those extra classes. The only practical difference is that the AnsibleRoleViewSet.endpoint = "roles" instead of "ansible/roles". Either way, the endpoint would be v3/content/ansible/roles/</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 6, 2018 at 10:25 AM, 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">+1 to option 1. It's consistent.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 6, 2018 at 10:21 AM, Dennis Kliban <span dir="ltr"><<a href="mailto:dkliban@redhat.com" target="_blank">dkliban@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">Option 1 is the most consistent. +1 to option 1<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-2588553887303934882h5">On Fri, Apr 6, 2018 at 10:19 AM, Austin Macdonald <span dir="ltr"><<a href="mailto:amacdona@redhat.com" target="_blank">amacdona@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-2588553887303934882h5"><div dir="ltr"><div>IMO:</div><div>We should suggest v3/content/<plugin>/<type>/. [Proposal 1] We should mention the other options with the pros, cons in the plugin writer docs.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 5, 2018 at 10:54 AM, David Davis <span dir="ltr"><<a href="mailto:daviddavis@redhat.com" target="_blank">daviddavis@redhat.com</a>></span> wrote:<br><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><div><div><br></div><div>[0] <a href="https://pulp.plan.io/issues/3407" target="_blank">https://pulp.plan.io/issue<wbr>s/3407</a></div></div></div></div></blockquote><div><br></div><div>The correct link is: <a href="https://pulp.plan.io/issues/3472" target="_blank">https://pulp.plan.io/issues/34<wbr>72</a></div></div></div></div>
<br></div></div>______________________________<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>
<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></blockquote></div><br></div>