

def test_refresh_public_cidr_on_its_change(self):
    data = self.env.neutron_networks_get(self.cluster.id).json_body
    publ = filter((lambda ng: (publ_ng['name'] == 'public')), data['networks'])[0]
    self.assertEqual(publ['cidr'], '172.16.0.0/24')
    publ['cidr'] = '199.61.0.0/24'
    publ['gateway'] = '199.61.0.1'
    publ['ip_ranges'] = [['199.61.0.11', '199.61.0.33'], ['199.61.0.55', '199.61.0.99']]
    data['networking_parameters']['floating_ranges'] = [['199.61.0.111', '199.61.0.122']]
    resp = self.env.neutron_networks_put(self.cluster.id, data)
    self.assertEqual(200, resp.status_code)
    self.db.refresh(self.cluster)
    publ_ng = filter((lambda ng: (ng.name == 'public')), self.cluster.network_groups)[0]
    self.assertEqual(publ_ng.cidr, '199.61.0.0/24')

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_network_configuration.py TestNeutronNetworkConfigurationHandler.test_refresh_public_cidr_on_its_change/VarMisuse@36/50 `ng`->`publ_ng`