[blivet][master/rhel7-branch][PATCH] Allow user code provide callbacks for various actions/events

Brian C. Lane bcl at redhat.com
Thu Aug 28 23:23:06 UTC 2014


On Thu, Aug 28, 2014 at 10:09:35AM -0400, Anne Mulhern wrote:
> Getting rid of another of blivet's dependencies on anaconda is good, but..
> 
> The device here of the callbacks simply replacing the progress
> report context manager seems questionable. It seems
> like what is needed here is some kind of message queue which
> clients can listen to if they want to.
> 
> That blivet should have a callback mechanism seems quite correct.
> But I'm dubious about the idea of passing the _CallbacksRegister
> object around among a lot of different methods instead of actually
> registering the callback somehow on an appropriate object.

Unless there are going to be different callbacks per-method, I agree, it
should be registered someplace like the Blivet class instead of passing
it around everywhere.

> 
> I think that if the callbacks module does continue to exists in its
> current form, methods to construct each of the *Data objects
> should be provided, on the same principle as a method for
> constructing the _CallbacksRegister object is already provided.


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list