[Spacewalk-list] help with api

Brian Collins brianc at sedata.com
Wed Oct 30 16:53:29 UTC 2013


> 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)




More information about the Spacewalk-list mailing list