[Spacewalk-list] Python API examples
Speagle, Andy
andy.speagle at wichita.edu
Thu Nov 19 03:21:04 UTC 2009
Hey,
If you scan the list, I've posted some code for cloning errata. Those should be somewhat helpful, though my skill with python is laughable.
Andy
Sent via BlackBerry from T-Mobile
-----Original Message-----
From: Colin Coe <colin.coe at gmail.com>
Date: Wed, 18 Nov 2009 20:25:11
To: spacewalk-list at redhat.com<spacewalk-list at redhat.com>
Subject: [Spacewalk-list] Python API examples
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
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list
More information about the Spacewalk-list
mailing list