]>
Commit | Line | Data |
---|---|---|
31f18b77 FG |
1 | from pecan import expose |
2 | from pecan.rest import RestController | |
3 | ||
11fdf7f2 TL |
4 | from .config import Config |
5 | from .crush import Crush | |
6 | from .doc import Doc | |
7 | from .mon import Mon | |
8 | from .osd import Osd | |
9 | from .pool import Pool | |
81eedcae | 10 | from .perf import Perf |
11fdf7f2 TL |
11 | from .request import Request |
12 | from .server import Server | |
31f18b77 FG |
13 | |
14 | ||
15 | class 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 | } |