def test_routes_while_using_multiple_node_groups(self):
        self.env.create_node_group()
        objects.Cluster.prepare_for_deployment(self.cluster)
        serializer = get_serializer_for_cluster(self.cluster)
        facts = serializer(AstuteGraph(self.cluster)).serialize(
            self.cluster, self.cluster.nodes)

        for node in facts:
            node_db = objects.Node.get_by_uid(node['uid'])
            is_public = objects.Node.should_have_public(node_db)
            endpoints = node['network_scheme']['endpoints']
            if 'compute' in node_db.roles:
                # private network won't have routes
                self.assertEqual(endpoints['br-prv'], {'IP': 'none'})
                endpoints.pop('br-prv')
            else:
                self.assertNotIn('br-prv', endpoints)
            if is_public:
                # floating network won't have routes
                self.assertEqual(endpoints['br-floating'], {'IP': 'none'})
                endpoints.pop('br-floating')
            for name, descr in six.iteritems(endpoints):
                self.assertTrue({'IP', 'routes'}.issubset(descr))
                # the only route in this case is for Admin network
                # others are shared
                self.assertIn(len(descr['routes']), [0, 1])
                if descr['routes']:
                    self.assertEqual(name, 'br-fw-admin')
                    for route in descr['routes']:
                        self.assertItemsEqual(['net', 'via'], route)
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_orchestrator_serializer_70.py/TestNetworkTemplateSerializer70.test_routes_while_using_multiple_node_groups/original