

def test_management_network_gw_set_but_not_in_use(self):
    net_meta = self.env.get_default_networks_metadata().copy()
    mgmt = filter((lambda n: (n['name'] == 'management')), net_meta['nova_network']['networks'])[0]
    mgmt['gateway'] = '192.168.0.1'
    self.assertEqual(mgmt['use_gateway'], False)
    cluster = self.env.create(cluster_kwargs={
        'net_provider': consts.CLUSTER_NET_PROVIDERS.nova_network,
    }, release_kwargs={
        'networks_metadata': net_meta,
        'api': False,
    }, nodes_kwargs=[{
        'pending_addition': True,
    }])
    resp = self.env.nova_networks_get(cluster['id'])
    data = resp.json_body
    for n in data['networks']:
        if (n['name'] in ('management', 'storage')):
            self.assertIsNone(n['gateway'])

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