[Pulp-list] Scheduled repo sync
Mike McCune
mmccune at redhat.com
Mon Jun 14 16:36:18 UTC 2010
On 06/14/2010 07:49 AM, Jason Dobies wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> https://fedorahosted.org/pulp/wiki/RepoSync
>
> I put together an outline of how the feature is going to work (not
> really the implementation yet, just use cases) if anyone wants to take a
> look.
>
"* If a sync schedule already exists on a repo, the call to create a new
schedule entry will fail. The user must explicitly remove the existing
schedule prior to creating a new one. This should help minimize user
errors where the incorrect repo ID is specified and prevent existing
schedules from being destroyed."
why the notion of 'add and delete' for schedules. Why not just
set/unset? If you have only one schedule entry it seems like it is more
of something that you would just set or clear. Calling any CLI/API to
set the schedule wouldn't error out if their schedule was there, it
would just update the field.
with the add/delete you need new API methods for setting schedules:
repoApi.create_sync_schedule('some-id', '01 * * * *')
*error*
repoApi.delete_sync_schedule('some-id')
repoApi.create_sync_schedule('some-id', '01 * * * *')
vs just :
repo = repoApi.repo('some-id')
repo['syncSchedule'] = '01 * * * *'
repoApi.update(repo)
and to delete:
repo = repoApi.repo('some-id')
repo['syncSchedule'] = None
repoApi.update(repo)
Mike
--
Mike McCune
mmccune AT redhat.com
Red Hat Engineering | Portland, OR
Systems Management | 650.254.4248
More information about the Pulp-list
mailing list