Skip to content
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

Merged
merged 14 commits into from May 31, 2017
Merged

ceph-mgr: Implement new pecan-based rest api #14457

merged 14 commits into from May 31, 2017

Commits on May 22, 2017

  1. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    5ed2631 View commit details
    Browse the repository at this point in the history
  2. restful: Use keys instead of tokens+cephx

    Signed-off-by: Boris Ranto <branto@redhat.com>
    b-ranto committed May 22, 2017
    Copy the full SHA
    cdd2079 View commit details
    Browse the repository at this point in the history
  3. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    e58ba75 View commit details
    Browse the repository at this point in the history
  4. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    21af955 View commit details
    Browse the repository at this point in the history
  5. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    f59e9bf View commit details
    Browse the repository at this point in the history
  6. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    aeed9a1 View commit details
    Browse the repository at this point in the history
  7. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    4f452ad View commit details
    Browse the repository at this point in the history
  8. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    92fa210 View commit details
    Browse the repository at this point in the history
  9. restful: Use port 8003

    This allows us to run both calamari and the rest api at the same time.
    
    Signed-off-by: Boris Ranto <branto@redhat.com>
    b-ranto committed May 22, 2017
    Copy the full SHA
    32dafc8 View commit details
    Browse the repository at this point in the history
  10. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    48ba07a View commit details
    Browse the repository at this point in the history
  11. restful: List full requests in /request

    Signed-off-by: Boris Ranto <branto@redhat.com>
    b-ranto committed May 22, 2017
    Copy the full SHA
    10ebd6e View commit details
    Browse the repository at this point in the history
  12. restful: Output sub-commands more clearly

    Signed-off-by: Boris Ranto <branto@redhat.com>
    b-ranto committed May 22, 2017
    Copy the full SHA
    f45a282 View commit details
    Browse the repository at this point in the history
  13. 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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    884dfc2 View commit details
    Browse the repository at this point in the history
  14. restful: Add a qa workunit

    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>
    b-ranto committed May 22, 2017
    Copy the full SHA
    74be9d8 View commit details
    Browse the repository at this point in the history