diff options
| author | Ricardo Carrillo Cruz <emaildericky@gmail.com> | 2011-02-23 20:13:50 +0100 |
|---|---|---|
| committer | Ricardo Carrillo Cruz <emaildericky@gmail.com> | 2011-02-23 20:13:50 +0100 |
| commit | 3c6a44327f0015cb531b06fbce38eb4e3a04ce6a (patch) | |
| tree | ec8741d4adfb25743c2e4f29fa7b0d75e68149ec /nova | |
| parent | bd0ca93866b48a7a65de8b97ab0ac0ac9c737f73 (diff) | |
| download | nova-3c6a44327f0015cb531b06fbce38eb4e3a04ce6a.tar.gz nova-3c6a44327f0015cb531b06fbce38eb4e3a04ce6a.tar.xz nova-3c6a44327f0015cb531b06fbce38eb4e3a04ce6a.zip | |
Fixes lp715424, code now checks network range can fit num_networks * network_size
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/network/manager.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/network/manager.py b/nova/network/manager.py index c6eba225e..1b8627562 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -521,6 +521,11 @@ class VlanManager(NetworkManager): ' than 4094')) fixed_net = IPy.IP(cidr) + if fixed_net.len() < num_networks * network_size: + raise ValueError(_('The network range is not big enough to fit %s' + ' networks of size %s' % + (num_networks, network_size))) + fixed_net_v6 = IPy.IP(cidr_v6) network_size_v6 = 1 << 64 significant_bits_v6 = 64 |
