Two nitpicks about this bit you're adding in the factory:
if default_gateway is None and random.choice((True, False)): default_gateway = unicode(IPAddress(network.first + 1))
The factory has a helper for random.choice((True, False)): pick_bool().
Why are you forcing the gateway to be network.first + 1? I'd use self.pick_ip_in_network(network).
« Back to merge proposal
Two nitpicks about this bit you're adding in the factory:
if default_gateway is None and random. choice( (True, False)):
default_ gateway = unicode( IPAddress( network. first + 1))
The factory has a helper for random. choice( (True, False)): pick_bool().
Why are you forcing the gateway to be network.first + 1? I'd use self.pick_ ip_in_network( network) .