Code review comment for lp:~rvb/maas/zone-placement

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Not quite voting yet, because the diff isn't updating for some reason and I haven't seen the final branch yet.

As for the actual code I do see, two notes that apply in multiple places:

1. Where possible, please avoid implicit boolean conversions! Instead of “if zone:” say “if zone is not None:” or “if zone != '':” etc.

2. In several places you basically do:

    node = factory.make_node()
    zone = factory.make_zone(nodes=[node])

I think it would be just slightly more obvious to do...

    zone = factory.make_zone()
    node = factory.make_node(zone=zone)

« Back to merge proposal