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: 128M (134217728 bytes)
19 Format specific information:
23 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
52 payload offset: 2068480
55 === Successful image creation (with non-default options) ===
57 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.luks", "size": 0}}}
59 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
62 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"cipher-alg": "twofish-128", "cipher-mode": "ctr", "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}}}
64 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
67 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
69 virtual size: 64M (67108864 bytes)
71 Format specific information:
74 cipher alg: twofish-128
75 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
104 payload offset: 528384
105 master key iters: XXX
107 === Invalid BlockdevRef ===
109 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "this doesn't exist", "size": 67108864}}}
111 Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
112 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
117 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "iter-time": 10, "key-secret": "keysec0", "size": 0}}}
119 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
122 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
124 virtual size: 0 (0 bytes)
126 Format specific information:
130 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
159 payload offset: 2068480
160 master key iters: XXX
162 === Invalid sizes ===
164 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 18446744073709551104}}}
166 Job failed: The requested file size is too large
167 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
170 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 9223372036854775808}}}
172 Job failed: The requested file size is too large
173 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
176 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "luks", "file": "node0", "key-secret": "keysec0", "size": 9223372036854775296}}}
178 Job failed: The requested file size is too large
179 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
182 === Resize image with invalid sizes ===
184 {"execute": "block_resize", "arguments": {"node_name": "node1", "size": 9223372036854775296}}
185 {"error": {"class": "GenericError", "desc": "The requested file size is too large"}}
186 {"execute": "block_resize", "arguments": {"node_name": "node1", "size": 9223372036854775808}}
187 {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'size', expected: integer"}}
188 {"execute": "block_resize", "arguments": {"node_name": "node1", "size": 18446744073709551104}}
189 {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'size', expected: integer"}}
190 {"execute": "block_resize", "arguments": {"node_name": "node1", "size": -9223372036854775808}}
191 {"error": {"class": "GenericError", "desc": "Parameter 'size' expects a >0 size"}}
192 image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"}
194 virtual size: 0 (0 bytes)
196 Format specific information:
200 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
229 payload offset: 2068480
230 master key iters: XXX