<div dir="ltr">I'm curious about how these "actions" are defined. Is the /v3/actions/ namespace limited to plugins? Or, for example, should distribution create/update/delete be nested under /v3/actions/? What about repository create/update/delete?<div><br><div><div><div><div dir="ltr" class="m_273973160206290731m_-9185557409415748035gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>David<br></div></div></div></div></div></div></div></div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 1, 2019 at 9:08 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><br>
    </p>
    <div class="gmail-m_273973160206290731gmail-m_-9185557409415748035gmail-m_-5008507235204849681moz-cite-prefix">On 3/1/19 2:45 PM, Robin Chan wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Justin,</div>
        <div>Would such a change make a significant difference in the
          effort, complexity, or time to migrate existing (or support
          new) plugins in Katello?</div>
      </div>
    </blockquote>
    <p>It would be a very small and simple change.<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Robin<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, Mar 1, 2019 at 2:00 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">To
          me this makes a lot of sense, allows for plugin flexibility,
          and is <br>
          more consistent across plugins.<br>
          <br>
          I feel like this will make differences between plugins more <br>
          understandable by reading the api docs, rather than scanning
          the <br>
          README's of the respective plugin and trying to work out what
          is different.<br>
          <br>
          Justin<br>
          <br>
          On 2/28/19 1:42 PM, Austin Macdonald wrote:<br>
          > Now that we have a handful of plugins that have somewhat
          different <br>
          > workflows, surprising user-facing differences in the
          interface for <br>
          > plugin-related actions are becoming apparent.<br>
          ><br>
          > Example: Publish<br>
          >     File:<br>
          >         Create a publisher<br>
          >         v3/publishers/file/1/publish/ repository=$REPO<br>
          >     Ansible:<br>
          >         (no publisher)<br>
          >         v3/publications/ repository=$REPO<br>
          ><br>
          > The difference is not huge, having a different endpoint
          does defy <br>
          > expectations of a user who is familiar with one plugin,
          who then moves <br>
          > to another plugin.<br>
          ><br>
          > Plugins can also implement other endpoints, like RPM's
          one-shot <br>
          > upload. The problem is that we have mixed idioms. Plugins
          are <br>
          > encouraged to create task endpoints for objects (remote's
          sync, <br>
          > publisher's publish), but they are also encouraged to
          create arbitrary <br>
          > endpoints for any other actions. Users are not able to
          form reasonable <br>
          > expectations for this part of the interface from plugin
          to plugin.<br>
          ><br>
          > Proposal:<br>
          > We could move all "actions" into a single area,
          namespaced by plugin <br>
          > (by convention). This would allow the plugins the freedom
          to do <br>
          > whatever they need to do while keeping the interface
          consistent and <br>
          > predictable for users of multiple plugins. These
          "actions" could be <br>
          > synchronous or asynchronous. Importantly, this would also
          create a <br>
          > logical "group" of endpoints a user could look for in the
          REST API docs.<br>
          ><br>
          > Examples:<br>
          > v3/actions/file/publish/ publisher=$PUB repository=$REPO<br>
          > v3/actions/ansible/publish/ repository=$REPO<br>
          > v3/actions/rpm/upload/ <a class="gmail-m_273973160206290731gmail-m_-9185557409415748035gmail-m_-5008507235204849681moz-txt-link-abbreviated" href="mailto:file@./foo-4.1-1.noarch.rpm" target="_blank">file@./foo-4.1-1.noarch.rpm</a>
          repository=$REPO<br>
          ><br>
          > Will this push back the RC?<br>
          > No. The changes to the plugin API will be small, and the
          changes to <br>
          > each plugin would be moving sync and publish endpoints,
          leaving the <br>
          > logic almost identical. I anticipate the most time
          consuming aspect of <br>
          > this will be adjusting the documentation of each plugin--
          but since <br>
          > they will follow similar patterns, this shouldn't be too
          much work either.<br>
          ><br>
          > To sum up:<br>
          > We should move sync and publish endpoints to <br>
          > /actions/<plugin>/<action_name>/ to be
          consistent with other <br>
          > plugin-defined actions like one-shot upload. This will
          look very nice <br>
          > in swagger docs, and should provide more consistent
          workflows for <br>
          > users of multiple plugins.<br>
          <br>
          _______________________________________________<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>
    </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>