On Wed, May 15, 2013 at 7:49 AM, Thomas Thrainer <[email protected]>wrote:

>
>
>
> On Tue, May 14, 2013 at 8:15 PM, Bernardo Dal Seno <[email protected]>wrote:
>
>> On 14 May 2013 15:52, Thomas Thrainer <[email protected]> wrote:
>> > LUNetwork* and associated helper functions are extracted to network.py.
>> >
>> > Signed-off-by: Thomas Thrainer <[email protected]>
>> > ---
>> >  Makefile.am            |   3 +-
>> >  lib/cmdlib/__init__.py | 714
>> +-----------------------------------------------
>> >  lib/cmdlib/common.py   |  25 ++
>> >  lib/cmdlib/network.py  | 718
>> +++++++++++++++++++++++++++++++++++++++++++++++++
>> >  4 files changed, 749 insertions(+), 711 deletions(-)
>> >  create mode 100644 lib/cmdlib/network.py
>>
>> In most of Ganeti code, helper functions precede their use in a file.
>> In network.py you are putting helper functions at the end of the file.
>> I think it would be better if we would be consistent on this regard.
>> Rest LGTM, thanks.
>>
>> In "old" cmdlib.py, helper functions were scattered all over the place,
> sometimes defined above and sometimes below the classes which use them.
> I've put all helper functions for a module at the end of the file in this
> patch series, but if there is a guideline how to arrange them (or if we can
> agree on one), I can rearrange them.
>

If we need to define a guideline, I'd go with Bernardo's suggestion and I'd
say to put them before their use.

My 2 cents.

Cheers,
Michele

Reply via email to