[Freeipa-devel] XML-RPC API: update_*
Karl MacMillan
kmacmill at redhat.com
Tue Dec 11 15:33:37 UTC 2007
On Tue, 2007-12-11 at 10:31 -0500, Rob Crittenden wrote:
> The XML-RPC interface for updating things is a bit funky. One needs to
> pass in the original entry and the new one and those are diffed and
> committed by the API.
>
> Kevin liked doing it this way because it decreased the chance of mid-air
> collisions.
>
> So if admin A and admin B both edited user U at the same time but
> updated different fields both commits would succeed if we send the
> original record. Otherwise one would stomp on the other.
>
> That is fine but not everyone will want to carry the original data
> around merely to pass it back. I'm proposing a compromise: we provide both.
>
> I want to make it support an empty record ('') for old. If that happens
> then we look up the current record and use that as the "old" entry.
> Otherwise we use the one passed in. Alternatively I could create a
> separate set of calls, one that handles old and new and one that just
> handles new but that might be even more confusing.
>
> Opinions?
>
The empty record idea sounds good to me.
Karl
More information about the Freeipa-devel
mailing list