Fix incorrect netaddr.IPNetwork.subnet usage

Fix incorrect netaddr.IPNetwork.subnet usage:
prefixlen is providden: split net by 2

Change-Id: I26d10fcf1537c4a3f98cc1273ea27b00f45b12eb
This commit is contained in:
Alexey Stepanov 2016-09-30 13:02:01 +03:00
parent 8784634559
commit cf846fe657
1 changed files with 2 additions and 2 deletions

View File

@ -72,8 +72,8 @@ class ChangeVipManually(TestBasic):
}
)
self.show_step(4)
ip_to_set = str(
self.env.d_env.get_network(name='public').ip.subnet()[0][5])
net = self.env.d_env.get_network(name='public').ip
ip_to_set = str(list(net.subnet(net.prefixlen + 1))[0][5])
logger.debug("public vip is going to be set to {}".format(ip_to_set))
public_vip_data = {'network': 2,
'vip_name': 'public',