[katello-devel] Ideas for a ruby interface to our api?
David Davis
daviddavis at redhat.com
Wed Feb 20 16:34:05 UTC 2013
That was my understanding as well.
David
----- Original Message -----
> From: "Bryan Kearney" <bkearney at redhat.com>
> To: katello-devel at redhat.com
> Sent: Wednesday, February 20, 2013 10:06:49 AM
> Subject: Re: [katello-devel] Ideas for a ruby interface to our api?
>
> On 02/20/2013 07:37 AM, Eric D Helms wrote:
> >
> >
> >
> > On Wed, Feb 20, 2013 at 5:01 AM, Tom McKay <thomasmckay at redhat.com
> > <mailto:thomasmckay at redhat.com>> wrote:
> >
> >
> >
> > ----- Original Message -----
> > > From: "Tomas Strachota" <tstrachota at redhat.com
> > <mailto:tstrachota at redhat.com>>
> > > To: katello-devel at redhat.com
> > > <mailto:katello-devel at redhat.com>
> > > Sent: Wednesday, February 20, 2013 4:50:45 AM
> > > Subject: Re: [katello-devel] Ideas for a ruby interface to
> > > our api?
> > >
> > > On 02/19/2013 05:40 PM, Tom McKay wrote:
> > > >
> > > >
> > > > ----- Original Message -----
> > > >> From: "Tomas Strachota" <tstrachota at redhat.com
> > <mailto:tstrachota at redhat.com>>
> > > >> To: "Tom McKay" <thomasmckay at redhat.com
> > <mailto:thomasmckay at redhat.com>>
> > > >> Cc: katello-devel at redhat.com
> > > >> <mailto:katello-devel at redhat.com>
> > > >> Sent: Tuesday, February 19, 2013 11:32:21 AM
> > > >> Subject: Re: [katello-devel] Ideas for a ruby interface
> > > >> to our
> > > >> api?
> > > >>
> > > >> On 02/19/2013 05:23 PM, Tom McKay wrote:
> > > >>>
> > > >>>
> > > >>> ----- Original Message -----
> > > >>>> From: "Tomas Strachota" <tstrachota at redhat.com
> > <mailto:tstrachota at redhat.com>>
> > > >>>> To: katello-devel at redhat.com
> > > >>>> <mailto:katello-devel at redhat.com>
> > > >>>> Sent: Tuesday, February 19, 2013 11:07:51 AM
> > > >>>> Subject: Re: [katello-devel] Ideas for a ruby interface
> > > >>>> to our
> > > >>>> api?
> > > >>>>
> > > >>>> On 02/19/2013 03:54 PM, Tom McKay wrote:
> > > >>>>>
> > > >>>>> I'd like to whip up a ruby interface to our API. The
> > > >>>>> python
> > > >>>>> based
> > > >>>>> CLI is not very friendly for scripting, in my opinion.
> > > >>>>> Are
> > > >>>>> there
> > > >>>>> tools/frameworks/whatever out there that you know of
> > > >>>>> that might
> > > >>>>> make the task of wrapping our API and exposing it as
> > > >>>>> ruby
> > > >>>>> commands?
> > > >>>>>
> > > >>>>
> > > >>>> Isn't it a feature of api pie? It provides api bindings
> > > >>>> wrapped
> > > >>>> in
> > > >>>> a
> > > >>>> gem.
> > > >>>>
> > > >>>> But let me ask a question:
> > > >>>> What exactly do you find so unfriendly about python
> > > >>>> that it is
> > > >>>> worth
> > > >>>> rewriting the cli?
> > > >>>>
> > > >>>> Tomas
> > > >>>>
> > > >>>>
> > > >>>
> > > >>> We have python bindings already? Are there example
> > > >>> scripts?
> > > >>>
> > > >>
> > > >> Not sure if I understand the question.
> > > >>
> > > >> If you meant ruby bindings - we don't have them, but the
> > > >> api is
> > > >> documented so it should be possible to generate it:
> > > >> https://github.com/Pajk/apipie-rails#bindings-generator
> > > >>
> > > >> Tomas
> > > >>
> > > >
> > > > I was asking if there were python bindings already with
> > > > katello so
> > > > I could write a python script.
> > > >
> > > > If you're saying I could run the apipie stuff against
> > > > katello and
> > > > generate these python bindings, then I understand. That is
> > > > what I
> > > > was looking for in python instead of ruby.
> > > >
> > > I see, I understand you now.
> > > If you want bindings for Ruby than apipie is your friend.
> > > If you want bindings for Python it's exactly as Eric wrote.
> > >
> > > > "As a user, I would like to write management scripts in
> > > > the
> > > > language of my choice against a katello server."
> > > >
> > > > If python bindings are already with the install, then I
> > > > cannot find
> > > > them nor mention of them on the wiki. Am I missing
> > > > something
> > > > obvious?
> > > >
> > > > The CLI is interesting and useful if "language of my
> > > > choice" is
> > > > bash. Right?
> > > >
> > > > The CLI command 'shell' is interactive but doesn't appear
> > > > to be
> > > > python; what is it?
> > > It is python, actually. It's based on 'cmd'
> > > http://docs.python.org/2/library/cmd.html
> >
> > What I meant here was that the shell command itself is not
> > scriptable:
> >
> > $ katello shell
> > katello> x = 12
> > *** Unknown syntax: x = 12
> > katello>
> >
> > So you are asking for the convenience of the Katello shell with
> > pre-configured commands that also includes a fully functional
> > Python
> > shell? Given that, with a standard python shell, you can import the
> > Katello package and make calls directly to it.
>
> there are two examples we can look at:
>
> space-command
> MS power shell
>
> does anyone know how either deal with this
>
> - bk
>
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
>
More information about the katello-devel
mailing list