[Spacewalk-list] help with api

Maria Iano maria at purplecoffee.com
Fri Nov 1 16:39:07 UTC 2013


On Fri, Nov 01, 2013 at 11:39:08AM +0000, Brian Collins wrote:
> > > Thanks, it's useful to hear it does work in python. Here is how I call the
> > > api in my script for a single key.
> > >
> > > my $key = $opt_a;
> > > # my $key = $client->string($opt_a); # this didn't work either
> > > my $details = $client->call('activationkey.getDetails', $session, $key);
> > >
> > > At least I now have a workaround of doing it in python with a chunk of
> > > working code to start from.
> > 
> > Interesting.  Mine doesn't work in Python.
> > 
> > #!/usr/bin/python
> > (login stuff, define client, key)
> > client.activationkey.listActivationKeys(key)
> > # returns a list of dictionaries; I pick one, copy the key from it
> > actkey='1-8a4bf8bf138495df5737ae8037310efd'
> > client.activationkey.getDetails(key,actkey)
> > (traceback)
> 

I was told this is a bug fixed in 5.5 and I should upgrade. I'm going to
try python first as I have way too much to do already.

Thanks!
Maria




More information about the Spacewalk-list mailing list