]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/cli-integration/rbd: iSCSI REST API responses aren't pretty-printed anymore 52283/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 31 Aug 2022 07:22:05 +0000 (09:22 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 2 Jul 2023 09:17:46 +0000 (11:17 +0200)
See https://github.com/ceph/ceph-iscsi/pull/263 and
https://github.com/pallets/flask/pull/2193.  Flask stopped
pretty-printing by default in 1.0:

  Change the default for JSONIFY_PRETTYPRINT_REGULAR to False.
  json.jsonify returns a compact format by default, and an indented
  format in debug mode.

Fixes: https://tracker.ceph.com/issues/57343
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 1cec9e83c02c366b5274739ae11297b6fca8584f)

src/test/cli-integration/rbd/rest_api_create.t
src/test/cli-integration/rbd/rest_api_delete.t

index 0006626cc81052db0b40d4d90790663e69e5b489..d0308eef38dc737aa2ac290a1e6a9041990d9574 100644 (file)
@@ -1,25 +1,19 @@
 Create a datapool/block1 disk
 =============================
   $ sudo curl --user admin:admin -d mode=create -d size=300M -X PUT http://127.0.0.1:5000/api/disk/datapool/block1 -s
-  {
-    "message": "disk create/update successful"
-  }
+  {"message":"disk create/update successful"}
 
 Create the target IQN
 =====================
   $ sudo curl --user admin:admin -X PUT http://127.0.0.1:5000/api/target/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw -s
-  {
-    "message": "Target defined successfully"
-  }
+  {"message":"Target defined successfully"}
 
 Create the first gateway
 ========================
   $ HOST=`python3 -c "import socket; print(socket.getfqdn())"`
   > IP=`hostname -i | awk '{print $1}'`
   > sudo curl --user admin:admin -d ip_address=$IP -X PUT http://127.0.0.1:5000/api/gateway/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/$HOST -s
-  {
-    "message": "Gateway creation successful"
-  }
+  {"message":"Gateway creation successful"}
 
 Create the second gateway
 ========================
@@ -32,27 +26,19 @@ Create the second gateway
   >   HOST=`python3 -c "import socket; print(socket.getfqdn('$IP'))"`
   >   sudo curl --user admin:admin -d ip_address=$IP -X PUT http://127.0.0.1:5000/api/gateway/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/$HOST -s
   > fi
-  {
-    "message": "Gateway creation successful"
-  }
+  {"message":"Gateway creation successful"}
 
 Attach the disk
 ===============
   $ sudo curl --user admin:admin -d disk=datapool/block1 -X PUT http://127.0.0.1:5000/api/targetlun/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw -s
-  {
-    "message": "Target LUN mapping updated successfully"
-  }
+  {"message":"Target LUN mapping updated successfully"}
 
 Create a host
 =============
   $ sudo curl --user admin:admin -X PUT http://127.0.0.1:5000/api/client/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/iqn.1994-05.com.redhat:client -s
-  {
-    "message": "client create/update successful"
-  }
+  {"message":"client create/update successful"}
 
 Map the LUN
 ===========
   $ sudo curl --user admin:admin -d disk=datapool/block1 -X PUT http://127.0.0.1:5000/api/clientlun/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/iqn.1994-05.com.redhat:client -s
-  {
-    "message": "client masking update successful"
-  }
+  {"message":"client masking update successful"}
index f8406447f1b90f9ba96dff8ba61efd6b411e5a03..0e66d25d92012a2a0c72dba5b8aa69180ad5555b 100644 (file)
@@ -1,27 +1,19 @@
 Delete the host
 ===============
   $ sudo curl --user admin:admin -X DELETE http://127.0.0.1:5000/api/client/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/iqn.1994-05.com.redhat:client -s
-  {
-    "message": "client delete successful"
-  }
+  {"message":"client delete successful"}
 
 Delete the iscsi-targets disk
 =============================
   $ sudo curl --user admin:admin -d disk=datapool/block1 -X DELETE http://127.0.0.1:5000/api/targetlun/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw -s
-  {
-    "message": "Target LUN mapping updated successfully"
-  }
+  {"message":"Target LUN mapping updated successfully"}
 
 Delete the target IQN
 =====================
   $ sudo curl --user admin:admin -X DELETE http://127.0.0.1:5000/api/target/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw -s
-  {
-    "message": "Target deleted."
-  }
+  {"message":"Target deleted."}
 
 Delete the disks
 ================
   $ sudo curl --user admin:admin -X DELETE http://127.0.0.1:5000/api/disk/datapool/block1 -s
-  {
-    "message": "disk map deletion successful"
-  }
+  {"message":"disk map deletion successful"}