Fix update_network_cidr method
subnet() method of netaddr.IPNetwork expects size of subnets to be returned so we should pass to it subnet of the smaller size, not 1 Change-Id: Id6b7e8e43419d224cc1c3202ffd253664245d5d4 Closes-Bug: #1571543
This commit is contained in:
parent
d50676807b
commit
16a176232e
|
@ -2648,7 +2648,7 @@ class FuelWebClient(object):
|
|||
if network['name'] != network_name:
|
||||
continue
|
||||
old_cidr = netaddr.IPNetwork(str(network['cidr']))
|
||||
new_cidr = list(old_cidr.subnet(1))[0]
|
||||
new_cidr = list(old_cidr.subnet(old_cidr.prefixlen + 1))[0]
|
||||
assert_not_equal(old_cidr, new_cidr,
|
||||
'Can\t create a subnet using default cidr {0} '
|
||||
'for {1} network!'.format(old_cidr, network_name))
|
||||
|
|
Loading…
Reference in New Issue