Wrap generator into list

Method generate_networks_for_template in TestNetworkTemplatesBase
    use pop() method to fetch subnets. But netaddr.Network.subnet
    return generetor.

Change-Id: I1ad457557914d89ff2b6fcbba3a638aa7d038253
Closes-bug: #1556054
(cherry picked from commit 290a20775e)
This commit is contained in:
Dmitry Tyzhnenko
2016-03-11 14:34:41 +02:00
committed by Vadim Rovachev
parent b50c8871eb
commit 78fc20e41c

View File

@@ -56,7 +56,7 @@ class TestNetworkTemplatesBase(TestBasic):
group_id = [n['id'] for n in nodegroups if
n['name'] == nodegroup][0]
ip_network = netaddr.IPNetwork(str(ip_nets[nodegroup]))
ip_subnets = ip_network.subnet(int(ip_prefixlen))
ip_subnets = list(ip_network.subnet(int(ip_prefixlen)))
for network, interface in networks:
ip_subnet = ip_subnets.pop()
networks_data.append(