def stop_cluster(self, req, body=None):
     """
     stop_cluster
     """
     LOG.info("CEPH_LOG stop_cluster body=%s" % body)
     context = req.environ['vsm.context']
     cluster_id = body["cluster"]["id"]
     if cluster_id:
         nodes = db.init_node_get_by_cluster_id(context, cluster_id)
     else:
         nodes = db.init_node_get_all(context)
     servers = {"servers": nodes}
     self.scheduler_api.stop_cluster(context, servers)
     return {"message": "Success"}
 def stop_cluster(self, req, body=None):
     """
     stop_cluster
     """
     LOG.info("CEPH_LOG stop_cluster body=%s"%body )
     context = req.environ['vsm.context']
     cluster_id = body["cluster"]["id"]
     if cluster_id:
         nodes = db.init_node_get_by_cluster_id(context,cluster_id)
     else:
         nodes = db.init_node_get_all(context)
     servers = {"servers":nodes}
     self.scheduler_api.stop_cluster(context,servers)
     return {"message":"Success"}
Beispiel #3
0
 def init_node_get_by_cluster_id(self, context, cluster_id):
     """Get init node by cluster id."""
     return db.init_node_get_by_cluster_id(context, cluster_id)
 def init_node_get_by_cluster_id(self, context, cluster_id):
     """Get init node by cluster id."""
     return db.init_node_get_by_cluster_id(context, cluster_id)