

def test_refresh_mask_on_cidr_change(self):
    resp = self.env.nova_networks_get(self.cluster.id)
    data = resp.json_body
    mgmt = [n for n in data['networks'] if (n['name'] == 'management')][0]
    cidr = (mgmt['cidr'].partition('/')[0] + '/25')
    mgmt['cidr'] = cidr
    resp = self.env.nova_networks_put(self.cluster.id, data)
    self.assertEqual(resp.status_code, 200)
    self.db.refresh(self.cluster)
    mgmt_ng = [ng for ng in self.cluster.network_groups if (ng.name == 'management')][0]
    self.assertEqual(mgmt_ng.cidr, cidr)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_network_configuration.py TestNovaNetworkConfigurationHandler.test_refresh_mask_on_cidr_change/original