]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/controllers/cluster.py
1 # -*- coding: utf-8 -*-
3 from ..security
import Scope
4 from ..services
.cluster
import ClusterModel
5 from . import APIDoc
, APIRouter
, EndpointDoc
, RESTController
6 from ._version
import APIVersion
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")
15 return ClusterModel
.from_db().dict()
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()