[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [et-mgmt-tools] [PATCH] Port utility functions to Solaris



John Levon wrote:
> On Mon, Dec 08, 2008 at 09:20:23PM -0500, Cole Robinson wrote:
>
>   
>> Unfortunately, 'util' is part of the public API, so removing dead
>> functions isn't a good idea. Granted, we probably have a grand total
>> of 3 API users (virt cli tools, virt-manager, koan), but I think it's
>> better to just play by the rules. I'm certainly not opposed to moving
>>     
>
> OK.
>
>   
>> It might be a good idea to make an internal util file, so we have an
>> alternate place to dump utility methods without them automatically
>> entering the public API.
>>     
>
> How are we supposed to know what's in the public API and what isn't? Is
> it automatically any file ever used by virt-manager?
>
> It seems to me like everything should be moved wholesale into a new
> directory, and anything legacy left in place (forwarded on to the new
> implementation if needed). It doesn't seem feasible to maintain code
> to provide an unspecified API forever!
>
>   

Anything that is explicitly exported via __init__.py is public. That
covers *Guest, *Installer, all the VirtualDevices, CloneManager, and
the util file. Anything marked with an underscore is an explicit way
to mark something private in a public module or class.

We don't need to maintain this old code if it's been replace. Just
put a comment that they are deprecated, and when we get around to
building out formal API docs, it will be clear.
> What name do you want for the internal util file?
>
>   

privutil? internal_util? No preference as long as it's obvious.

Thanks,
Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]