def test_gateway_not_set_for_none_ip(self):
        attrs = copy.deepcopy(self.cluster.attributes.editable)
        attrs['neutron_advanced_configuration']['neutron_dvr']['value'] = True
        resp = self.app.patch(
            reverse(
                'ClusterAttributesHandler',
                kwargs={'cluster_id': self.cluster.id}),
            params=jsonutils.dumps({'editable': attrs}),
            headers=self.default_headers
        )
        self.assertEqual(200, resp.status_code)
        self.assertTrue(objects.Cluster.neutron_dvr_enabled(self.cluster))

        objects.Cluster.set_network_template(self.cluster, None)

        computes = filter(lambda n: 'compute' in n.roles, self.cluster.nodes)
        self.assertTrue(len(computes) > 0)
        compute = computes[0]

        serializer = get_serializer_for_cluster(self.cluster)
        net_serializer = serializer.get_net_provider_serializer(self.cluster)
        self.assertIs(net_serializer, self.general_serializer)

        nm = objects.Cluster.get_network_manager(self.cluster)
        networks = nm.get_node_networks(compute)

        self.assertFalse(objects.Node.should_have_public_with_ip(compute))
        network_scheme = net_serializer.generate_network_scheme(
            compute, networks)
        self.assertNotIn('gateway', network_scheme['endpoints']['br-ex'])
        self.assertEqual('none', network_scheme['endpoints']['br-ex']['IP'])
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_orchestrator_serializer_70.py/TestNetworkTemplateSerializer70.test_gateway_not_set_for_none_ip/original