Test storage was created on a rhel/centos 7 node using targetcli.
Reviewed-by: Eric Blake <eblake@redhat.com>
--- /dev/null
+[
+ {
+ "device": "drive-virtio-disk0",
+ "parent": {
+ "stats": {
+ "flush_total_time_ns": 0,
+ "wr_highest_offset": 0,
+ "wr_total_time_ns": 0,
+ "failed_wr_operations": 0,
+ "failed_rd_operations": 0,
+ "wr_merged": 0,
+ "wr_bytes": 0,
+ "timed_stats": [
+
+ ],
+ "failed_flush_operations": 0,
+ "account_invalid": false,
+ "rd_total_time_ns": 0,
+ "flush_operations": 0,
+ "wr_operations": 0,
+ "rd_merged": 0,
+ "rd_bytes": 0,
+ "invalid_flush_operations": 0,
+ "account_failed": false,
+ "rd_operations": 0,
+ "invalid_wr_operations": 0,
+ "invalid_rd_operations": 0
+ },
+ "node-name": "#block038"
+ },
+ "stats": {
+ "flush_total_time_ns": 0,
+ "wr_highest_offset": 0,
+ "wr_total_time_ns": 0,
+ "failed_wr_operations": 0,
+ "failed_rd_operations": 0,
+ "wr_merged": 0,
+ "wr_bytes": 0,
+ "timed_stats": [
+
+ ],
+ "failed_flush_operations": 0,
+ "account_invalid": true,
+ "rd_total_time_ns": 995504,
+ "flush_operations": 0,
+ "wr_operations": 0,
+ "rd_merged": 0,
+ "rd_bytes": 512,
+ "invalid_flush_operations": 0,
+ "account_failed": true,
+ "idle_time_ns": 117550038551,
+ "rd_operations": 1,
+ "invalid_wr_operations": 0,
+ "invalid_rd_operations": 0
+ },
+ "node-name": "#block169"
+ },
+ {
+ "device": "drive-scsi0-0-1",
+ "parent": {
+ "stats": {
+ "flush_total_time_ns": 0,
+ "wr_highest_offset": 0,
+ "wr_total_time_ns": 0,
+ "failed_wr_operations": 0,
+ "failed_rd_operations": 0,
+ "wr_merged": 0,
+ "wr_bytes": 0,
+ "timed_stats": [
+
+ ],
+ "failed_flush_operations": 0,
+ "account_invalid": false,
+ "rd_total_time_ns": 0,
+ "flush_operations": 0,
+ "wr_operations": 0,
+ "rd_merged": 0,
+ "rd_bytes": 0,
+ "invalid_flush_operations": 0,
+ "account_failed": false,
+ "rd_operations": 0,
+ "invalid_wr_operations": 0,
+ "invalid_rd_operations": 0
+ },
+ "node-name": "#block250"
+ },
+ "stats": {
+ "flush_total_time_ns": 0,
+ "wr_highest_offset": 0,
+ "wr_total_time_ns": 0,
+ "failed_wr_operations": 0,
+ "failed_rd_operations": 0,
+ "wr_merged": 0,
+ "wr_bytes": 0,
+ "timed_stats": [
+
+ ],
+ "failed_flush_operations": 0,
+ "account_invalid": true,
+ "rd_total_time_ns": 0,
+ "flush_operations": 0,
+ "wr_operations": 0,
+ "rd_merged": 0,
+ "rd_bytes": 0,
+ "invalid_flush_operations": 0,
+ "account_failed": true,
+ "rd_operations": 0,
+ "invalid_wr_operations": 0,
+ "invalid_rd_operations": 0
+ },
+ "node-name": "#block301"
+ }
+]
--- /dev/null
+[
+ {
+ "iops_rd": 0,
+ "detect_zeroes": "off",
+ "image": {
+ "virtual-size": 1073741824,
+ "filename": "json:{\"driver\": \"raw\", \"file\": {\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}}",
+ "format": "raw",
+ "dirty-flag": false
+ },
+ "iops_wr": 0,
+ "ro": false,
+ "node-name": "#block301",
+ "backing_file_depth": 0,
+ "drv": "raw",
+ "iops": 0,
+ "bps_wr": 0,
+ "write_threshold": 0,
+ "encrypted": false,
+ "bps": 0,
+ "bps_rd": 0,
+ "cache": {
+ "no-flush": false,
+ "direct": false,
+ "writeback": true
+ },
+ "file": "json:{\"driver\": \"raw\", \"file\": {\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}}",
+ "encryption_key_missing": false
+ },
+ {
+ "iops_rd": 0,
+ "detect_zeroes": "off",
+ "image": {
+ "virtual-size": 1073741824,
+ "filename": "json:{\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}",
+ "format": "iscsi",
+ "dirty-flag": false
+ },
+ "iops_wr": 0,
+ "ro": false,
+ "node-name": "#block250",
+ "backing_file_depth": 0,
+ "drv": "iscsi",
+ "iops": 0,
+ "bps_wr": 0,
+ "write_threshold": 0,
+ "encrypted": false,
+ "bps": 0,
+ "bps_rd": 0,
+ "cache": {
+ "no-flush": false,
+ "direct": false,
+ "writeback": true
+ },
+ "file": "json:{\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}",
+ "encryption_key_missing": false
+ },
+ {
+ "iops_rd": 0,
+ "detect_zeroes": "off",
+ "image": {
+ "virtual-size": 1073741824,
+ "filename": "json:{\"driver\": \"raw\", \"file\": {\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}}",
+ "format": "raw",
+ "dirty-flag": false
+ },
+ "iops_wr": 0,
+ "ro": false,
+ "node-name": "#block169",
+ "backing_file_depth": 0,
+ "drv": "raw",
+ "iops": 0,
+ "bps_wr": 0,
+ "write_threshold": 0,
+ "encrypted": false,
+ "bps": 0,
+ "bps_rd": 0,
+ "cache": {
+ "no-flush": false,
+ "direct": false,
+ "writeback": true
+ },
+ "file": "json:{\"driver\": \"raw\", \"file\": {\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}}",
+ "encryption_key_missing": false
+ },
+ {
+ "iops_rd": 0,
+ "detect_zeroes": "off",
+ "image": {
+ "virtual-size": 1073741824,
+ "filename": "json:{\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}",
+ "format": "iscsi",
+ "dirty-flag": false
+ },
+ "iops_wr": 0,
+ "ro": false,
+ "node-name": "#block038",
+ "backing_file_depth": 0,
+ "drv": "iscsi",
+ "iops": 0,
+ "bps_wr": 0,
+ "write_threshold": 0,
+ "encrypted": false,
+ "bps": 0,
+ "bps_rd": 0,
+ "cache": {
+ "no-flush": false,
+ "direct": false,
+ "writeback": true
+ },
+ "file": "json:{\"lun\": \"0\", \"portal\": \"example.com:3260\", \"driver\": \"iscsi\", \"transport\": \"tcp\", \"target\": \"iqn.2016-09.com.example:server\"}",
+ "encryption_key_missing": false
+ }
+]
--- /dev/null
+drive-scsi0-0-1
+filename : 'json:{"lun": "0", "portal": "example.com:3260", "driver": "iscsi", "transport": "tcp", "target": "iqn.2016-09.com.example:server"}'
+format node : '#block301'
+format drv : 'raw'
+storage node: '#block250'
+storage drv : 'iscsi'
+
+drive-virtio-disk0
+filename : 'json:{"lun": "0", "portal": "example.com:3260", "driver": "iscsi", "transport": "tcp", "target": "iqn.2016-09.com.example:server"}'
+format node : '#block169'
+format drv : 'raw'
+storage node: '#block038'
+storage drv : 'iscsi'
DO_TEST_BLOCK_NODE_DETECT("gluster");
DO_TEST_BLOCK_NODE_DETECT("blockjob");
DO_TEST_BLOCK_NODE_DETECT("luks");
+ DO_TEST_BLOCK_NODE_DETECT("iscsi");
#undef DO_TEST_BLOCK_NODE_DETECT