

def validate(self):
    super(LxcProvider, self).validate()
    if ('start_lxc_network' not in self.config):
        return
    lxc_net = netaddr.IPNetwork(self.config['start_lxc_network'])
    num_containers = self.config['containers_per_host']
    if ((lxc_net.size - 3) < num_containers):
        message = _('Network size is not enough for %d hosts.')
        raise exceptions.InvalidConfigException((message % num_containers))

dataset/ETHPy150Open openstack/rally/rally/deployment/serverprovider/providers/lxc.py LxcProvider.validate/original