Bug 1008677
Summary: | RFE: API to schedule package install action for multiple systems | ||
---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Dimitar Yordanov <dyordano> |
Component: | API | Assignee: | Tomas Lestach <tlestach> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Korbel <mkorbel> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 560 | CC: | cperry, mkorbel, pdrouet, pstudeni |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | spacewalk-java-2.3.8-41 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-01-16 09:13:56 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1113221 |
Description
Dimitar Yordanov
2013-09-16 20:06:15 UTC
system.scheduleApplyErrata with the option to specify list of servers and list of errata is available since Jul 2010. It was added via spacewalk commit: 1811f27e1ee15b2d099809c7d67b0f9e6e2f3f2b system.schedulePackageInstall is to be implemented Please, include the namespace, when writing about the API calls. TESTED on Satellite-5.7.0-RHEL6-re20141001.0 (spacewalk-java-2.3.8-28.el6sat) The method works fine good, but in documentation, there is mistake (/rhn/apidoc/handlers/SystemHandler.jsp#schedulePackageInstall). This method does not return integer, but array of integers. <API DOC> Method: schedulePackageInstall Description: Schedule package installation for a system. Parameters: string sessionKey array: int - serverId array: int - packageId dateTime.iso8601 earliestOccurrence Returns: int actionId - The action id of the scheduled action </API DOC> Reproducer: #!/usr/bin/python import xmlrpclib import datetime SATELLITE_URL = "http://localhost/rpc/api" SATELLITE_LOGIN = "admin" SATELLITE_PASSWORD = "xxx" client = xmlrpclib.Server(SATELLITE_URL, verbose=0) key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD) print "------- One system -------------" print client.system.schedulePackageInstall(key, 1000010016, [81, 3899], datetime.datetime.now()) print "------- Multi systems -------------" print client.system.schedulePackageInstall(key, [1000010016, 1000010018], [2940, 39], datetime.datetime.now()) client.auth.logout(key) Output: ------- One system ------------- 86 ------- Multi systems ------------- [87, 88] For the record system.schedulePackageInstall was implemented in Jun 2014 ... spacewalk.git: 6b84302fec6ff558e31807e09259e02f51607c82 Fix of the issue described in Comment#3 ... spacewalk.gitL VERIFIED on Satellite-5.7.0-RHEL6-re20141017.0 (spacewalk-java-2.3.8-44.el6sat) <API DOC> Method: schedulePackageInstall Description: Schedule package installation for a system. Parameters: string sessionKey array: int - serverId array: int - packageId dateTime.iso8601 earliestOccurrence Returns: array: int - actionId </API DOC> *** Bug 1000033 has been marked as a duplicate of this bug. *** Reverified with spacewalk-java-2.3.8-96.el6sat.noarch >>> systems = [1000010080, 1000010083] >>> packages = [33218, 33135] >>> print client.system.schedulePackageInstall(key, systems, packages, datetime.now() ) [1229, 1230] |