]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/restful/api/__init__.py
import ceph nautilus 14.2.2
[ceph.git] / ceph / src / pybind / mgr / restful / api / __init__.py
CommitLineData
31f18b77
FG
1from pecan import expose
2from pecan.rest import RestController
3
11fdf7f2
TL
4from .config import Config
5from .crush import Crush
6from .doc import Doc
7from .mon import Mon
8from .osd import Osd
9from .pool import Pool
81eedcae 10from .perf import Perf
11fdf7f2
TL
11from .request import Request
12from .server import Server
31f18b77
FG
13
14
15class Root(RestController):
16 config = Config()
17 crush = Crush()
18 doc = Doc()
19 mon = Mon()
20 osd = Osd()
81eedcae 21 perf = Perf()
31f18b77
FG
22 pool = Pool()
23 request = Request()
24 server = Server()
25
26 @expose(template='json')
27 def get(self, **kwargs):
28 """
29 Show the basic information for the REST API
30 This includes values like api version or auth method
31 """
32 return {
33 'api_version': 1,
34 'auth':
c07f9fc5 35 'Use "ceph restful create-key <key>" to create a key pair, '
31f18b77
FG
36 'pass it as HTTP Basic auth to authenticate',
37 'doc': 'See /doc endpoint',
38 'info': "Ceph Manager RESTful API server",
39 }