1 === Successful image creation (defaults) ===
3 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}}
5 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
8 {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}
10 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'imgfile', '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': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}}
59 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
62 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'hash-alg': 'sha1', 'cipher-mode': 'ctr', 'cipher-alg': 'twofish-128', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}, 'iter-time': 10, 'ivgen-alg': 'plain64', 'ivgen-hash-alg': 'md5', 'driver': 'luks', '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': {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'node0', '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': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 18446744073709551104L}}}
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': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 9223372036854775808L}}}
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': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', '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': {'size': 9223372036854775296, 'node_name': 'node1'}}
185 {u'error': {u'class': u'GenericError', u'desc': u'The requested file size is too large'}}
186 {'execute': 'block_resize', 'arguments': {'size': 9223372036854775808L, 'node_name': 'node1'}}
187 {u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter type for 'size', expected: integer"}}
188 {'execute': 'block_resize', 'arguments': {'size': 18446744073709551104L, 'node_name': 'node1'}}
189 {u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter type for 'size', expected: integer"}}
190 {'execute': 'block_resize', 'arguments': {'size': -9223372036854775808, 'node_name': 'node1'}}
191 {u'error': {u'class': u'GenericError', u'desc': u"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