Hi list
My apologies if this has already been added to SW in git but I wrote this
small patch to spacecmd's report inactivesystems function so that it also
outputs the system ID of inactive systems making spacecmd useful for
scripting the removal of inactive systems.
Thanks
--- /usr/lib/python2.6/site-packages/spacecmd/report.py.bak 2016-05-17
13:48:12.410396146 +0100
+++ /usr/lib/python2.6/site-packages/spacecmd/report.py 2016-05-17
15:10:11.867394933 +0100
@@ -85,11 +85,12 @@
if len(systems):
max_size = max_length([s.get('name') for s in systems])
- print '%s %s' % ('System'.ljust(max_size), 'Last Checkin')
- print ('-' * max_size) + ' ------------'
+ print '%s %s %s' % ('System'.ljust(max_size), 'ID ', 'Last
Checkin')
+ print ('-' * max_size) + ' -- ----------'
for s in sorted(systems, key=itemgetter('name')):
- print '%s %s' % (s.get('name').ljust(max_size),
+ print '%s %s %s' % (s.get('name').ljust(max_size),
+ s.get('id'),
s.get('last_checkin'))
####################
_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list