156ea7450SKevin Wolf=== Successful image creation (defaults) === 256ea7450SKevin Wolf 3*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} 4*00af1935SKevin Wolf{u'return': {}} 5*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 6*00af1935SKevin Wolf{u'return': {}} 756ea7450SKevin Wolf 8*00af1935SKevin Wolfimage: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} 956ea7450SKevin Wolffile format: IMGFMT 1056ea7450SKevin Wolfvirtual size: 4.0M (4194304 bytes) 1156ea7450SKevin Wolf 12*00af1935SKevin Wolf 13*00af1935SKevin Wolfimage: TEST_IMG 1456ea7450SKevin Wolffile format: IMGFMT 1556ea7450SKevin Wolfvirtual size: 4.0M (4194304 bytes) 1656ea7450SKevin Wolf 1756ea7450SKevin Wolf=== Test host-key-check options === 1856ea7450SKevin Wolf 19*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 8388608}}} 20*00af1935SKevin Wolf{u'return': {}} 21*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 22*00af1935SKevin Wolf{u'return': {}} 2356ea7450SKevin Wolf 24*00af1935SKevin Wolfimage: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} 2556ea7450SKevin Wolffile format: IMGFMT 2656ea7450SKevin Wolfvirtual size: 8.0M (8388608 bytes) 2756ea7450SKevin Wolf 28*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'mode': 'known_hosts'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} 29*00af1935SKevin Wolf{u'return': {}} 30*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 31*00af1935SKevin Wolf{u'return': {}} 32*00af1935SKevin Wolf 33*00af1935SKevin Wolfimage: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} 3456ea7450SKevin Wolffile format: IMGFMT 3556ea7450SKevin Wolfvirtual size: 4.0M (4194304 bytes) 3656ea7450SKevin Wolf 37*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': 'wrong', 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} 38*00af1935SKevin Wolf{u'return': {}} 39*00af1935SKevin WolfJob failed: remote host key does not match host_key_check 'wrong' 40*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 41*00af1935SKevin Wolf{u'return': {}} 42*00af1935SKevin Wolf 43*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': HASH, 'type': 'md5', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 8388608}}} 44*00af1935SKevin Wolf{u'return': {}} 45*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 46*00af1935SKevin Wolf{u'return': {}} 47*00af1935SKevin Wolf 48*00af1935SKevin Wolfimage: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} 4956ea7450SKevin Wolffile format: IMGFMT 5056ea7450SKevin Wolfvirtual size: 8.0M (8388608 bytes) 5156ea7450SKevin Wolf 52*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': 'wrong', 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 2097152}}} 53*00af1935SKevin Wolf{u'return': {}} 54*00af1935SKevin WolfJob failed: remote host key does not match host_key_check 'wrong' 55*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 56*00af1935SKevin Wolf{u'return': {}} 57*00af1935SKevin Wolf 58*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'hash': HASH, 'type': 'sha1', 'mode': 'hash'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} 59*00af1935SKevin Wolf{u'return': {}} 60*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 61*00af1935SKevin Wolf{u'return': {}} 62*00af1935SKevin Wolf 63*00af1935SKevin Wolfimage: json:{"driver": "IMGFMT", "file": {"server.host": "127.0.0.1", "server.port": "22", "driver": "ssh", "path": "TEST_IMG"}} 6456ea7450SKevin Wolffile format: IMGFMT 6556ea7450SKevin Wolfvirtual size: 4.0M (4194304 bytes) 6656ea7450SKevin Wolf 6756ea7450SKevin Wolf=== Invalid path and user === 6856ea7450SKevin Wolf 69*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': '/this/is/not/an/existing/path', 'host-key-check': {'mode': 'none'}, 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} 70*00af1935SKevin Wolf{u'return': {}} 71*00af1935SKevin WolfJob failed: failed to open remote file '/this/is/not/an/existing/path': Failed opening remote file (libssh2 error code: -31) 72*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 73*00af1935SKevin Wolf{u'return': {}} 7456ea7450SKevin Wolf 75*00af1935SKevin Wolf{'execute': 'x-blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'ssh', 'location': {'path': 'TEST_DIR/PID-t.img', 'host-key-check': {'mode': 'none'}, 'user': 'invalid user', 'server': {'host': '127.0.0.1', 'port': '22'}}, 'size': 4194304}}} 76*00af1935SKevin Wolf{u'return': {}} 77*00af1935SKevin WolfJob failed: failed to authenticate using publickey authentication and the identities held by your ssh-agent 78*00af1935SKevin Wolf{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 79*00af1935SKevin Wolf{u'return': {}} 80*00af1935SKevin Wolf 81