Created
September 21, 2016 20:35
-
-
Save tchellomello/3dd376930f1d614e5f211e13d789509f to your computer and use it in GitHub Desktop.
Archive pending actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import xmlrpclib | |
SATELLITE_URL = "http://orbital.usersys.redhat.com/rpc/api" | |
SATELLITE_LOGIN = "admin" | |
SATELLITE_PASSWORD = "redhat" | |
server = xmlrpclib.Server(SATELLITE_URL, verbose=0) | |
token = server.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD) | |
#==================================================== | |
in_progress = server.schedule.listInProgressActions(token) | |
for action in in_progress: | |
action_ids.append(action['id']) | |
print "%s action selected" % (len(action_ids)) | |
archive_result=client.schedule.archiveActions(key,action_ids) | |
#==================================================== | |
#logout | |
server.auth.logout(token) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment