def setUp(self):
        super(TestRepoAvailability, self).setUp()
        self.env.create(cluster_kwargs={
            'net_provider': 'neutron',
            'net_segment_type': 'gre'
        },
                        nodes_kwargs=[{
                            'roles': ['controller']
                        }, {
                            'roles': ['controller']
                        }, {
                            'roles': ['compute']
                        }, {
                            'roles': ['compute'],
                            'online': False
                        }])

        self.cluster = self.env.clusters[0]
        self.public_ng = next(ng for ng in self.cluster.network_groups
                              if ng.name == 'public')
        self.free_ips = NetworkManager.get_free_ips(self.public_ng, 2)
        self.repo_urls = objects.Cluster.get_repo_urls(self.cluster)
        self.controllers = [
            n for n in self.cluster.nodes if 'controller' in n.all_roles
        ]
        self.online_uids = [n.uid for n in self.cluster.nodes if n.online]
    def setUp(self):
        super(TestRepoAvailability, self).setUp()
        self.env.create(
            cluster_kwargs={
                'net_provider': 'neutron',
                'net_segment_type': 'gre'
            },
            nodes_kwargs=[{'roles': ['controller']},
                          {'roles': ['controller']},
                          {'roles': ['compute']},
                          {'roles': ['compute'], 'online': False}])

        self.cluster = self.env.clusters[0]
        self.public_ng = next(ng for ng in self.cluster.network_groups
                              if ng.name == 'public')
        self.free_ips = NetworkManager.get_free_ips(self.public_ng, 2)
        self.repo_urls = objects.Cluster.get_repo_urls(self.cluster)
        self.controllers = [n for n in self.cluster.nodes
                            if 'controller' in n.all_roles]
        self.online_uids = [n.uid for n in self.cluster.nodes if n.online]
Exemplo n.º 3
0
 def network_data(self):
     # TODO(enchantner): move to object
     from nailgun.extensions.network_manager.manager import NetworkManager
     return NetworkManager.get_node_networks(self)
Exemplo n.º 4
0
 def network_data(self):
     # TODO(enchantner): move to object
     from nailgun.extensions.network_manager.manager import NetworkManager
     return NetworkManager.get_node_networks(self)