[Spacewalk-list] Python API examples

Colin Coe colin.coe at gmail.com
Thu Nov 19 02:25:11 UTC 2009


Hi all

I'm just starting re-writing my Satellite/Spacewalk API scripts to use
Python not Perl.  I'm using this as an exercise to learn Python.  I'm
having difficulty finding decent Python API script examples.  Could
someone point me at some?

Specifically, I can't work out how to reference the system ID I get from:
---
systems = client.system.listUserSystems(session)
for sys in systems:
   print sys

{'last_checkin': <DateTime u'20091119T10:06:53' at 2ba5b4c775f0>,
'id': 1000010011, 'name': 'test.sys'}
---

(No, https://my.sat/rhn/apidoc/scripts.jsp isn't very helpful)

I need to do this conversion as NetAddr::IP and Frontier::RPC are not
provided with RHEL (at least not yet).

TIA

CC

-- 
RHCE#805007969328369




More information about the Spacewalk-list mailing list