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 pfid=${1:-1}
|
||||||
local vfid=${2:-0}
|
local vfid=${2:-0}
|
||||||
|
|
||||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
"$rootdir/scripts/sma-client.py" <<- CREATE
|
||||||
{
|
{
|
||||||
"method": "CreateDevice",
|
"method": "CreateDevice",
|
||||||
"params": {
|
"params": {
|
||||||
"nvme": {
|
"nvme": {
|
||||||
"physical_id": "$pfid",
|
"physical_id": "$pfid",
|
||||||
"virtual_id": "$vfid"
|
"virtual_id": "$vfid"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
CREATE
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_device() {
|
function delete_device() {
|
||||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
"$rootdir/scripts/sma-client.py" <<- DELETE
|
||||||
{
|
{
|
||||||
"method": "DeleteDevice",
|
"method": "DeleteDevice",
|
||||||
"params": {
|
"params": {
|
||||||
"handle": "$1"
|
"handle": "$1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
DELETE
|
||||||
}
|
}
|
||||||
|
|
||||||
function attach_volume() {
|
function attach_volume() {
|
||||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
"$rootdir/scripts/sma-client.py" <<- ATTACH
|
||||||
{
|
{
|
||||||
"method": "AttachVolume",
|
"method": "AttachVolume",
|
||||||
"params": {
|
"params": {
|
||||||
"device_handle": "$1",
|
"device_handle": "$1",
|
||||||
"volume": {
|
"volume": {
|
||||||
"volume_id": "$(uuid2base64 $2)"
|
"volume_id": "$(uuid2base64 $2)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
ATTACH
|
||||||
}
|
}
|
||||||
|
|
||||||
function detach_volume() {
|
function detach_volume() {
|
||||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
"$rootdir/scripts/sma-client.py" <<- DETACH
|
||||||
{
|
{
|
||||||
"method": "DetachVolume",
|
"method": "DetachVolume",
|
||||||
"params": {
|
"params": {
|
||||||
"device_handle": "$1",
|
"device_handle": "$1",
|
||||||
"volume_id": "$(uuid2base64 $2)"
|
"volume_id": "$(uuid2base64 $2)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
DETACH
|
||||||
}
|
}
|
||||||
|
|
||||||
function vm_count_nvme() {
|
function vm_count_nvme() {
|
||||||
|
@ -14,31 +14,31 @@ function cleanup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function create_device() {
|
function create_device() {
|
||||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
"$rootdir/scripts/sma-client.py" <<- CREATE
|
||||||
{
|
{
|
||||||
"method": "CreateDevice",
|
"method": "CreateDevice",
|
||||||
"params": {
|
"params": {
|
||||||
"virtio_blk": {
|
"virtio_blk": {
|
||||||
"physical_id": "$1",
|
"physical_id": "$1",
|
||||||
"virtual_id": "0"
|
"virtual_id": "0"
|
||||||
},
|
},
|
||||||
"volume": {
|
"volume": {
|
||||||
"volume_id": "$(uuid2base64 $2)"
|
"volume_id": "$(uuid2base64 $2)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
CREATE
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_device() {
|
function delete_device() {
|
||||||
"$rootdir/scripts/sma-client.py" <<- EOF
|
"$rootdir/scripts/sma-client.py" <<- DELETE
|
||||||
{
|
{
|
||||||
"method": "DeleteDevice",
|
"method": "DeleteDevice",
|
||||||
"params": {
|
"params": {
|
||||||
"handle": "$1"
|
"handle": "$1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
DELETE
|
||||||
}
|
}
|
||||||
|
|
||||||
trap "cleanup; exit 1" SIGINT SIGTERM EXIT
|
trap "cleanup; exit 1" SIGINT SIGTERM EXIT
|
||||||
|
Loading…
Reference in New Issue
Block a user