diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-12-13 22:08:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-12-13 22:08:47 +0000 |
| commit | 67490c6b50174a89bce6719dd1b89fee8faa8ab2 (patch) | |
| tree | 424fa9c38bec9af7362ea97402cde21787ed85aa /nova | |
| parent | fd9e0e92af785d1e48ce42ce7eb4501595aabe3c (diff) | |
| parent | c032f4588f30d04b6868456fb557daab7986142a (diff) | |
Merge "Fix error when subnet doesn't have a cidr set"
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/network/quantum/manager.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/network/quantum/manager.py b/nova/network/quantum/manager.py index 551c825e6..86ee5e3da 100644 --- a/nova/network/quantum/manager.py +++ b/nova/network/quantum/manager.py @@ -514,8 +514,9 @@ class QuantumManager(manager.FlatManager): # Fill in some of the network fields that we would have # previously gotten from the network table (they'll be # passed to the linux_net functions). - network_ref['cidr'] = subnet['cidr'] - n = IPNetwork(subnet['cidr']) + if subnet['cidr']: + network_ref['cidr'] = subnet['cidr'] + n = IPNetwork(network_ref['cidr']) network_ref['dhcp_server'] = IPAddress(n.first + 1) network_ref['dhcp_start'] = IPAddress(n.first + 2) network_ref['broadcast'] = IPAddress(n.broadcast) |
