[Spacewalk-list] API-Calls syncRepo and getDetails

Jan Hutař jhutar at redhat.com
Mon Jul 9 08:08:12 UTC 2012


On Thu, 5 Jul 2012 11:27:13 +0200 Steve Meier
<email at steve-meier.de> wrote:

> Dear all,
> 
> I would like to trigger a syncRepo on specific channels before
> creating errata and running other tasks.
> 
> Since syncRepo seems to only pull the trigger is there a way
> to find out if the sync has completed via the API? Maybe via
> getDetails? Is the "Last Sync" updated on start or completion
> of a sync? Are there other ways to check assuming that I do
> not have access to the spacewalk host (logs, ps, etc).
> 
> Kind regards,
>   Steve Meier

Hello,
what I +- do is I compare:

    lastModified = client.channel.software.getDetails(key, CHANNEL)['last_modified']
    lastModified = time.strptime(lastModified.value, "%Y%m%dT%H:%M:%S")
    lastBuild = client.channel.software.getChannelLastBuildById(key, CHANNEL_ID)

If these two times matches, repodata are ready.

BUT: I do not have an idea if this is a valid way to do this.

Regards,
Jan



> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list


-- 
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/20120709/63bcf44f/attachment.sig>


More information about the Spacewalk-list mailing list