]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/controllers/cluster.py
add stop-gap to fix compat with CPUs not supporting SSE 4.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / controllers / cluster.py
1 # -*- coding: utf-8 -*-
2
3 from ..security import Scope
4 from ..services.cluster import ClusterModel
5 from . import APIDoc, APIRouter, EndpointDoc, RESTController
6 from ._version import APIVersion
7
8
9 @APIRouter('/cluster', Scope.CONFIG_OPT)
10 @APIDoc("Get Cluster Details", "Cluster")
11 class Cluster(RESTController):
12 @RESTController.MethodMap(version=APIVersion.EXPERIMENTAL)
13 @EndpointDoc("Get the cluster status")
14 def list(self):
15 return ClusterModel.from_db().dict()
16
17 @RESTController.MethodMap(version=APIVersion.EXPERIMENTAL)
18 @EndpointDoc("Update the cluster status",
19 parameters={'status': (str, 'Cluster Status')})
20 def singleton_set(self, status: str):
21 ClusterModel(status).to_db()