Skip to content

Commit

Permalink
Handle missing network_size in nova-manage
Browse files Browse the repository at this point in the history
In 'nova-manage network create' --network_size should be optional.

Fixes bug 1046605

Change-Id: I25ce9acbe664810aa8fe9a3b4a2951c0fac4e41a
  • Loading branch information
jogo committed Sep 11, 2012
1 parent 7741ac1 commit 7483115
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nova/network/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,11 +1371,12 @@ def create_networks(self, context,
"vlan_start", "vpn_start")
for key in int_args:
try:
kwargs[key] = int(kwargs[key])
value = kwargs.get(key)
if value is None:
continue
kwargs[key] = int(value)
except ValueError:
raise ValueError(_("%s must be an integer") % key)
except KeyError:
pass

# check for certain required inputs
label = kwargs["label"]
Expand Down

0 comments on commit 7483115

Please sign in to comment.