[Pulp-dev] Pulp3 MVP Refinement Next Steps
daviddavis at redhat.com
Fri Mar 10 18:08:50 UTC 2017
Yea, I’m including @tstrachota here to correct me if I’m wrong. In
foreman/katello, they use apipie to document the api and this produces the
structure in json:
The CLI is written using hammer-cli. It takes the apipie json (which it
also caches) and turns it into commands/options. Here’s that code:
I’m not sure if it’s generic enough for us to use though unfortunately.
Maybe it could be though? Also, it’s in Ruby of course.
Lastly, here’s just an example of the user set of cli commands. It looks
longer than it ought to be due to i18n of the field names but take a look
At the very least, I think hammer-cli is a great example of one direction
we could take in order to eliminate redundant code and make our CLI mostly
On Fri, Mar 10, 2017 at 12:48 PM, Sean Myers <sean.myers at redhat.com> wrote:
> On 03/03/2017 04:09 PM, David Davis wrote:
> > This is essentially what foreman and katello do, and it works great. They
> > get an json export of the REST API structure from the server and then map
> > each endpoint to a command and the parameters to options. One can still
> > override the default functionality for each command (or add extra
> > but for most commands, there isn't any code required.
> I'd love to avoid wheel reinvention here, got a link handy?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pulp-dev