#!/usr/bin/python ### # To the extent possible under law, Red Hat, Inc. has dedicated all copyright to this software to the public domain worldwide, pursuant to the CC0 Public Domain Dedication. # This software is distributed without any warranty. See . ### import xmlrpclib client = xmlrpclib.Server('http://satellite.example.com/rpc/api',verbose=0) key = client.auth.login('satadmin','satadminpassword') actions = [] for entry in client.schedule.listCompletedActions(key): actions.append(entry['id']) client.schedule.archiveActions(key,actions) client.auth.logout(key)