コード例 #1
0
ファイル: periodic.py プロジェクト: openstack/sahara
        def run_verifications(self, ctx):
            LOG.debug("Executing health checks for the clusters")
            start_dict = {'verification': {'status': 'START'}}
            all_clusters = conductor.cluster_get_all(
                ctx, status=c_u.CLUSTER_STATUS_ACTIVE)
            clusters_to_manage = self.hr.get_subset(all_clusters)

            for cluster in clusters_to_manage:
                try:
                    vb.validate_verification_start(cluster)
                    api.update_cluster(cluster.id, start_dict)
                except vb.CannotVerifyError:
                    LOG.debug("Skipping running verification "
                              "on the cluster %s", cluster.name)
コード例 #2
0
ファイル: periodic.py プロジェクト: stackhpc/sahara
        def run_verifications(self, ctx):
            LOG.debug("Executing health checks for the clusters")
            start_dict = {'verification': {'status': 'START'}}
            all_clusters = conductor.cluster_get_all(
                ctx, status=c_u.CLUSTER_STATUS_ACTIVE)
            clusters_to_manage = self.hr.get_subset(all_clusters)

            for cluster in clusters_to_manage:
                try:
                    vb.validate_verification_start(cluster)
                    api.update_cluster(cluster.id, start_dict)
                except vb.CannotVerifyError:
                    LOG.debug("Skipping running verification "
                              "on the cluster %s" % cluster.name)
コード例 #3
0
ファイル: test_v10.py プロジェクト: wdanyel/sahara
 def test_cluster_update(self):
     with mock.patch('sahara.service.quotas.check_cluster'):
         cluster = api.create_cluster(SAMPLE_CLUSTER)
         updated_cluster = api.update_cluster(cluster.id,
                                              {'description': 'Cluster'})
         self.assertEqual('Cluster', updated_cluster.description)
コード例 #4
0
ファイル: test_v10.py プロジェクト: Imperat/sahara
 def test_cluster_update(self):
     with mock.patch('sahara.service.quotas.check_cluster'):
         cluster = api.create_cluster(SAMPLE_CLUSTER)
         updated_cluster = api.update_cluster(
             cluster.id, {'description': 'Cluster'})
         self.assertEqual('Cluster', updated_cluster.description)