numam-spdk/test/config_converter/spdk_config_virtio.json
Tomasz Zawadzki a9a0761bcc scripts/config_converter: skip sections not present in legacy config
Sections 'Nvme', 'Nvmf', 'Bdev' and 'iSCSI' were always present in
the output of config_converter. Even when they were not present in
the legacy config.

This posed an issue with iSCSI section. Support for iscsi_set_options
is part of lib/iscsi, that is not compiled with all applications
(such as nvmf_tgt).

Fixes #1741

This patch checks if there is corresponding section in the legacy
config, and only then presents the JSON output.

Added test to verify output from empty legacy config.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ief94e92115dbd80c890dcb434b7c6d5376421c9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5879
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-15 08:32:10 +00:00

43 lines
972 B
JSON

{
"subsystems": [
{
"subsystem": "bdev",
"config": [
{
"params": {
"name": "VirtioScsi0",
"dev_type": "scsi",
"vq_size": 512,
"trtype": "user",
"traddr": "naa.vhost.0",
"vq_count": 8
},
"method": "bdev_virtio_attach_controller"
},
{
"params": {
"name": "VirtioScsi1",
"dev_type": "scsi",
"vq_size": 512,
"trtype": "user",
"traddr": "naa.vhost.1",
"vq_count": 8
},
"method": "bdev_virtio_attach_controller"
},
{
"params": {
"name": "VirtioBlk4",
"dev_type": "blk",
"vq_size": 512,
"trtype": "user",
"traddr": "vhost.1",
"vq_count": 1
},
"method": "bdev_virtio_attach_controller"
}
]
}
]
}