test/sma: use smaller indention for the JSONs
Both tests sma/vhost_blk.sh and sma/vfiouser_qemu.sh use two spaces indention for JSON Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com> Change-Id: I59aedabe40852d45a606c82a875a49a182137f91 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14293 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
9f0d4f33c3
commit
d326389d96
@ -11,54 +11,54 @@ function create_device() {
|
||||
local pfid=${1:-1}
|
||||
local vfid=${2:-0}
|
||||
|
||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
||||
"$rootdir/scripts/sma-client.py" <<- CREATE
|
||||
{
|
||||
"method": "CreateDevice",
|
||||
"params": {
|
||||
"nvme": {
|
||||
"physical_id": "$pfid",
|
||||
"virtual_id": "$vfid"
|
||||
}
|
||||
}
|
||||
"method": "CreateDevice",
|
||||
"params": {
|
||||
"nvme": {
|
||||
"physical_id": "$pfid",
|
||||
"virtual_id": "$vfid"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
CREATE
|
||||
}
|
||||
|
||||
function delete_device() {
|
||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
||||
"$rootdir/scripts/sma-client.py" <<- DELETE
|
||||
{
|
||||
"method": "DeleteDevice",
|
||||
"params": {
|
||||
"handle": "$1"
|
||||
}
|
||||
"method": "DeleteDevice",
|
||||
"params": {
|
||||
"handle": "$1"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
DELETE
|
||||
}
|
||||
|
||||
function attach_volume() {
|
||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
||||
"$rootdir/scripts/sma-client.py" <<- ATTACH
|
||||
{
|
||||
"method": "AttachVolume",
|
||||
"params": {
|
||||
"device_handle": "$1",
|
||||
"volume": {
|
||||
"volume_id": "$(uuid2base64 $2)"
|
||||
}
|
||||
}
|
||||
"method": "AttachVolume",
|
||||
"params": {
|
||||
"device_handle": "$1",
|
||||
"volume": {
|
||||
"volume_id": "$(uuid2base64 $2)"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ATTACH
|
||||
}
|
||||
|
||||
function detach_volume() {
|
||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
||||
"$rootdir/scripts/sma-client.py" <<- DETACH
|
||||
{
|
||||
"method": "DetachVolume",
|
||||
"params": {
|
||||
"device_handle": "$1",
|
||||
"volume_id": "$(uuid2base64 $2)"
|
||||
}
|
||||
"method": "DetachVolume",
|
||||
"params": {
|
||||
"device_handle": "$1",
|
||||
"volume_id": "$(uuid2base64 $2)"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
DETACH
|
||||
}
|
||||
|
||||
function vm_count_nvme() {
|
||||
|
@ -14,31 +14,31 @@ function cleanup() {
|
||||
}
|
||||
|
||||
function create_device() {
|
||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
||||
"$rootdir/scripts/sma-client.py" <<- CREATE
|
||||
{
|
||||
"method": "CreateDevice",
|
||||
"params": {
|
||||
"virtio_blk": {
|
||||
"physical_id": "$1",
|
||||
"virtual_id": "0"
|
||||
},
|
||||
"volume": {
|
||||
"volume_id": "$(uuid2base64 $2)"
|
||||
}
|
||||
}
|
||||
"method": "CreateDevice",
|
||||
"params": {
|
||||
"virtio_blk": {
|
||||
"physical_id": "$1",
|
||||
"virtual_id": "0"
|
||||
},
|
||||
"volume": {
|
||||
"volume_id": "$(uuid2base64 $2)"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
CREATE
|
||||
}
|
||||
|
||||
function delete_device() {
|
||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
||||
"$rootdir/scripts/sma-client.py" <<- DELETE
|
||||
{
|
||||
"method": "DeleteDevice",
|
||||
"params": {
|
||||
"handle": "$1"
|
||||
}
|
||||
"method": "DeleteDevice",
|
||||
"params": {
|
||||
"handle": "$1"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
DELETE
|
||||
}
|
||||
|
||||
trap "cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||
|
Loading…
Reference in New Issue
Block a user