[Spacewalk-list] API Question

Jan Hutař jhutar at redhat.com
Tue May 28 15:13:52 UTC 2013


On Mon, 13 May 2013 15:05:57 +0000 "Wood, Brendan"
<Brendan.Wood at Mercy.Net> wrote:

> Hey all,
> 
> I am looking to script the steps to Update all available
> packages and then run a script once that completes (the same
> action available through the web interface).   I know that I
> can use listLatestUpgradablePackages to get the list of
> packages and then push that list into schedulePackageInstall
> to do the update, with all of that followed by
> scheduleScriptRun call to do the reboot - but what I am
> missing is the dependency between those tasks.   When we
> schedule it through the web interface, the script won't run
> unless the package update runs successfully.   How do I do
> that same behavior via the API?

Would this help?

https://<spacewalk>/rhn/apidoc/handlers/ScheduleHandler.jsp#listCompletedSystems

Regards,
Jan



> My initial thought was to use listSystemEvents in a loop to
> see if the first succeeded (and then call the scriptRun), but
> that call is broken in 1.9.   That seems more like a
> workaround anyway.
> 
> I also don't want to use 2 scriptRun calls (with the first
> being a yum update), as I only want to update content provided
> by spacewalk.  Some systems have repo content not provided by
> SP.
> 
> Anyone have any recommendations how to go about this?
> 
> Thanks in advance!
> 
> -b
> This email contains information which may be PROPRIETARY IN
> NATURE OR OTHERWISE PROTECTED BY LAW FROM DISCLOSURE and is
> intended only for the use of the addresses(s) named above.  If
> you have received this email in error, please contact the
> sender immediately.


-- 
Jan Hutar     Systems Management QA
jhutar at redhat.com     Red Hat, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20130528/5abade32/attachment.sig>


More information about the Spacewalk-list mailing list