]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
doc/mgr/ceph_api: Promptify example commands in index.rst
authorVille Ojamo <14869000+bluikko@users.noreply.github.com>
Fri, 28 Jul 2023 04:49:19 +0000 (11:49 +0700)
committerZac Dover <zac.dover@proton.me>
Sat, 29 Jul 2023 05:55:31 +0000 (15:55 +1000)
Use the more modern prompt block instead of
using code blocks for example commands.

Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
(cherry picked from commit 4f9bd62f374d2f6bf74296d87e5205960464c349)

doc/mgr/ceph_api/index.rst

index 5785bf130a306d53acaf3a3db146ed6062ee8ff0..1cdc9a97bfb560c38e2daa25ecdc7ff669410aa0 100644 (file)
@@ -41,14 +41,16 @@ So, prior to start consuming the Ceph API, a valid JSON Web Token (JWT) has to
 be obtained, and it may then be reused for subsequent requests. The
 ``/api/auth`` endpoint will provide the valid token:
 
-.. code-block:: sh
+.. prompt:: bash $
 
-  $ curl -X POST "https://example.com:8443/api/auth" \
-    -H  "Accept: application/vnd.ceph.api.v1.0+json" \
-    -H  "Content-Type: application/json" \
-    -d '{"username": <username>, "password": <password>}'
+   curl -X POST "https://example.com:8443/api/auth" \
+   -H  "Accept: application/vnd.ceph.api.v1.0+json" \
+   -H  "Content-Type: application/json" \
+   -d '{"username": <username>, "password": <password>}'
 
-  { "token": "<redacted_token>", ...}
+::
+
+    { "token": "<redacted_token>", ...}
 
 The token obtained must be passed together with every API request in the
 ``Authorization`` HTTP header::
@@ -74,11 +76,11 @@ purpose, Ceph API is built upon the following principles:
 
 An example:
 
-.. code-block:: bash
+.. prompt:: bash $
 
-  $ curl -X GET "https://example.com:8443/api/osd" \
-    -H  "Accept: application/vnd.ceph.api.v1.0+json" \
-    -H  "Authorization: Bearer <token>"
+   curl -X GET "https://example.com:8443/api/osd" \
+   -H  "Accept: application/vnd.ceph.api.v1.0+json" \
+   -H  "Authorization: Bearer <token>"
 
 
 Specification