1 === Successful image creation (defaults) ===
3 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.luks", "size": 0}}}
5 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
8 {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.luks", "node-name": "imgfile"}}
10 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "luks", "file": "imgfile", "iter-time": 10, "key-secret": "keysec0", "size": 134217728}}}
12 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
15 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
17 virtual size: 128 MiB (134217728 bytes)
19 Format specific information:
21 detached header: false
24 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
53 payload offset: 2068480
56 === Successful image creation (with non-default options) ===
58 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.luks", "size": 0}}}
60 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
63 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cipher-alg": "aes-128", "cipher-mode": "cbc", "driver": "luks", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.luks"}, "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-alg": "md5", "key-secret": "keysec0", "size": 67108864}}}
65 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
68 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
70 virtual size: 64 MiB (67108864 bytes)
72 Format specific information:
74 detached header: false
77 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
106 payload offset: 528384
107 master key iters: XXX
109 === Invalid BlockdevRef ===
111 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "luks", "file": "this doesn't exist", "size": 67108864}}}
113 Job failed: Cannot find device='this doesn't exist' nor node-name='this doesn't exist'
114 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
119 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "luks", "file": "node0", "iter-time": 10, "key-secret": "keysec0", "size": 0}}}
121 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
124 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
126 virtual size: 0 B (0 bytes)
128 Format specific information:
130 detached header: false
133 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
162 payload offset: 2068480
163 master key iters: XXX
165 === Invalid sizes ===
167 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 18446744073709551104}}}
169 Job failed: The requested file size is too large
170 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
173 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 9223372036854775808}}}
175 Job failed: The requested file size is too large
176 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
179 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 9223372036854775296}}}
181 Job failed: The requested file size is too large
182 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
185 === Resize image with invalid sizes ===
187 {"execute": "block_resize", "arguments": {"node-name": "node1", "size": 9223372036854775296}}
188 {"error": {"class": "GenericError", "desc": "offset(9223372036854775296) exceeds maximum(9223372035781033984)"}}
189 {"execute": "block_resize", "arguments": {"node-name": "node1", "size": 9223372036854775808}}
190 {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'size', expected: integer"}}
191 {"execute": "block_resize", "arguments": {"node-name": "node1", "size": 18446744073709551104}}
192 {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'size', expected: integer"}}
193 {"execute": "block_resize", "arguments": {"node-name": "node1", "size": -9223372036854775808}}
194 {"error": {"class": "GenericError", "desc": "Parameter 'size' expects a >0 size"}}
195 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
197 virtual size: 0 B (0 bytes)
199 Format specific information:
201 detached header: false
204 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
233 payload offset: 2068480
234 master key iters: XXX