On Thu, May 16, 2013 at 5:17 PM, Bernardo Dal Seno <[email protected]>wrote:

> On 16 May 2013 12:14, Bernardo Dal Seno <[email protected]> wrote:
> > On 16 May 2013 10:23, 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
> >
> > LGTM, thanks.
>
> Not really, sorry. This breaks the ordering:
>
> Just a quick question: Are all lists (imports, in makefiles, etc.) always
sorted alphabetically? I actually sorted the files in the makefile on
purpose, going from "important" to "less important". The end result is (see
comments for my reasoning):

lib/cmdlib/__init__.py \  # main entry point, thus at the top
lib/cmdlib/common.py \  # common and base stuff, needed by everything -> top
lib/cmdlib/base.py \
lib/cmdlib/cluster.py \  # ordering here: cluster (big) -> group (part of
cluster) -> node (part of group) -> instance (on node)
lib/cmdlib/group.py \
lib/cmdlib/node.py \
lib/cmdlib/instance.py \  # the parts of instance are a bit random, true
lib/cmdlib/instance_storage.py \
lib/cmdlib/instance_migration.py \
lib/cmdlib/instance_operation.py \
lib/cmdlib/instance_query.py \
lib/cmdlib/instance_utils.py \   # "private" helper functions for instance.
In my reasoning, private (detailed) stuff goes a the end ;-)
lib/cmdlib/backup.py \  # here comes the somewhat unsorted rest, which does
not quite align to a "physical" entity (cluster, group, node, instance)
lib/cmdlib/query.py \
lib/cmdlib/operating_system.py \
lib/cmdlib/tags.py \
lib/cmdlib/network.py \
lib/cmdlib/misc.py \
lib/cmdlib/test.py  # tests are the least important, thus at the end

So, the question is, is it a guideline to always sort such lists
alphabetically, or are other reasoning permitted as well? Does my reasoning
make sense to anybody except me :)?



> diff --git a/Makefile.am b/Makefile.am
> index 35d1e5d..58b1869 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -311,7 +311,8 @@ cmdlib_PYTHON = \
>         lib/cmdlib/__init__.py \
>         lib/cmdlib/common.py \
>         lib/cmdlib/base.py \
> -       lib/cmdlib/tags.py
> +       lib/cmdlib/tags.py \
> +       lib/cmdlib/network.py
>
> Rest still LGTM :-)
>
> Bernardo
>



-- 
Thomas Thrainer | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Katherine Stephens

Reply via email to