New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ceph-mgr: Implement new pecan-based rest api #14457
Commits on May 22, 2017
-
ceph-mgr: Implement new pecan-based rest api
The new rest API uses pecan for the restful functionality and simplifies the code significantly. It should be mostly equivalent in functionality to the django-based rest API. The api is self-documenting via /doc endpoint. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Use keys instead of tokens+cephx
Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Prepare for api file split
The patch moves decorators into a separate file so they could be shared amongst various files. It also fixes key generation in werkzeug 0.10+ and fixes get input method on various endpoints. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Split api.py file into a module
The patch makes the REST api being served by a module, not a single monolithic file. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Use fixed cert/pkey files
This allows users to create their own certificates that are signed by a CA. If the keys are not present then a self-signed certificate will be created and distributed amongst all the mgr nodes. It also allows us to get rid of the pyOpenSSL dependency. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: send_command changed type
The send_command function now requires 6 arguments, switching back to mon commands as that is what we used before. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Do not store the config file in /etc/ceph
This also contains a documentation fix for authentication in / endpoint. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Generate cert/key in post scripts
This is the simplest way to generate the keys and probably the least likely to cause trouble in the future. Signed-off-by: Boris Ranto <branto@redhat.com>
-
This allows us to run both calamari and the rest api at the same time. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Use pecan hook instead of catch decorator
This removes the catch decorator which was useful primarily for testing purposes and instead switches to a pecan error hook which will print the traceback to the ceph-mgr log. Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: List full requests in /request
Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Output sub-commands more clearly
Signed-off-by: Boris Ranto <branto@redhat.com>
-
restful: Add pagination support
This commit adds a pagination support via paginate decorator. The decorator will paginate the output if it is told to. The first page is 0, the last page is -1. The decorator was applied to /request endpoint so you can get requests in hunderds if you supply the endpoint with ?page=N. If no ?page=N is supplied, the decorator will output the full list. Signed-off-by: Boris Ranto <branto@redhat.com>
-
This commit adds a simple test that will send the requests to most of the API endpoints and check the status code of the requests. Signed-off-by: Boris Ranto <branto@redhat.com>