[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [RFC] Xend XML-RPC Refactoring
On Tue, Mar 14, 2006 at 12:58:48AM -0600, Anthony Liguori wrote:
> Hi Ewan,
> I've made the changes you've requested except where I've described
> below. After all the regressions complete, I'll push it out to the list
> (sometime tomorrow as long as nothing fails miserably).
> Ewan Mellor wrote:
> >This is all a bit skanky, and could be easily cleaned up by introducing a
> >naming convention for XendDomain, XendNode, etc. How about if we prefixed
> >every function that we wish to expose to the messaging layer with
> >"public_"? So for example XendDomainInfo.send_sysrq would be named
> >public_send_sysrq instead. Then, we could use that to guide the
> >function registration, rather than having exclude lists and inline lists
> >of callable methods.
> I went ahead and started using the public_ naming convention for
> XendDomainInfo. It was fine for a couple of the methods but it got ugly
> real quick for things like deviceDestroy as it's called in a bunch of
> other places within Xend.
> So, I've got two possible solutions for this. We could just keep the
> white list or we could introduce new public_ methods within
> XendDomainInfo that were just simple wrappers for the underlying
> methods. It's seems a bit unnatural but less unnatural than peppering
> calls to public_ functions through Xend. Thoughts?
Yes, I'd go with the latter. public_device_destroy does the type
conversion, argument validation (with errors thrown if necessary) and
then just calls deviceDestroy. All the other calls to deviceDestroy
from within XendDomainInfo itself don't need the type conversion etc, so just
point at deviceDestroy directly.
Xen-devel mailing list