

def test_not_enough_ip_addresses_return_200_on_get(self):
    netconfig = self.env.neutron_networks_get(self.cluster.id).json_body
    public = next((net for net in netconfig['networks'] if (net['name'] == consts.NETWORKS.public)), None)
    public['ip_ranges'] = [['172.16.0.2', '172.16.0.4']]
    self.env.neutron_networks_put(self.cluster.id, netconfig)
    self.cluster.release.network_roles_metadata.append({
        'id': 'vip-bucket',
        'default_mapping': 'public',
        'properties': {
            'subnet': True,
            'gateway': False,
            'vip': [{
                'name': 'vip-a',
            }, {
                'name': 'vip-b',
            }, {
                'name': 'vip-c',
            }],
        },
    })
    self.db.flush()
    resp = self.env.neutron_networks_get(self.cluster.id, expect_errors=True)
    self.assertEqual(200, resp.status_code)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_network_configuration.py TestNeutronNetworkConfigurationHandler.test_not_enough_ip_addresses_return_200_on_get/original