]>
Commit | Line | Data |
---|---|---|
d06195e6 KW |
1 | === Successful image creation (defaults) === |
2 | ||
3fb588a0 | 3 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} |
5ba141dc KW |
4 | {u'return': {}} |
5 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
6 | {u'return': {}} | |
7 | ||
8 | {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}} | |
9 | {u'return': {}} | |
3fb588a0 | 10 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'imgfile', 'size': 134217728}}} |
5ba141dc KW |
11 | {u'return': {}} |
12 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
13 | {u'return': {}} | |
d06195e6 | 14 | |
5ba141dc | 15 | image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"} |
d06195e6 KW |
16 | file format: IMGFMT |
17 | virtual size: 128M (134217728 bytes) | |
5ba141dc | 18 | encrypted: yes |
d06195e6 KW |
19 | Format specific information: |
20 | ivgen alg: plain64 | |
21 | hash alg: sha256 | |
22 | cipher alg: aes-256 | |
5ba141dc | 23 | uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
d06195e6 KW |
24 | cipher mode: xts |
25 | slots: | |
26 | [0]: | |
27 | active: true | |
5ba141dc | 28 | iters: XXX |
d06195e6 KW |
29 | key offset: 4096 |
30 | stripes: 4000 | |
31 | [1]: | |
32 | active: false | |
33 | key offset: 262144 | |
34 | [2]: | |
35 | active: false | |
36 | key offset: 520192 | |
37 | [3]: | |
38 | active: false | |
39 | key offset: 778240 | |
40 | [4]: | |
41 | active: false | |
42 | key offset: 1036288 | |
43 | [5]: | |
44 | active: false | |
45 | key offset: 1294336 | |
46 | [6]: | |
47 | active: false | |
48 | key offset: 1552384 | |
49 | [7]: | |
50 | active: false | |
51 | key offset: 1810432 | |
52 | payload offset: 2068480 | |
5ba141dc | 53 | master key iters: XXX |
d06195e6 KW |
54 | |
55 | === Successful image creation (with non-default options) === | |
56 | ||
3fb588a0 | 57 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.luks'}}} |
5ba141dc KW |
58 | {u'return': {}} |
59 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
60 | {u'return': {}} | |
61 | ||
3fb588a0 | 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}}} |
5ba141dc KW |
63 | {u'return': {}} |
64 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
65 | {u'return': {}} | |
d06195e6 | 66 | |
5ba141dc | 67 | image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"} |
d06195e6 KW |
68 | file format: IMGFMT |
69 | virtual size: 64M (67108864 bytes) | |
5ba141dc | 70 | encrypted: yes |
d06195e6 KW |
71 | Format specific information: |
72 | ivgen alg: plain64 | |
73 | hash alg: sha1 | |
74 | cipher alg: twofish-128 | |
5ba141dc | 75 | uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
d06195e6 KW |
76 | cipher mode: ctr |
77 | slots: | |
78 | [0]: | |
79 | active: true | |
5ba141dc | 80 | iters: XXX |
d06195e6 KW |
81 | key offset: 4096 |
82 | stripes: 4000 | |
83 | [1]: | |
84 | active: false | |
85 | key offset: 69632 | |
86 | [2]: | |
87 | active: false | |
88 | key offset: 135168 | |
89 | [3]: | |
90 | active: false | |
91 | key offset: 200704 | |
92 | [4]: | |
93 | active: false | |
94 | key offset: 266240 | |
95 | [5]: | |
96 | active: false | |
97 | key offset: 331776 | |
98 | [6]: | |
99 | active: false | |
100 | key offset: 397312 | |
101 | [7]: | |
102 | active: false | |
103 | key offset: 462848 | |
104 | payload offset: 528384 | |
5ba141dc | 105 | master key iters: XXX |
d06195e6 KW |
106 | |
107 | === Invalid BlockdevRef === | |
108 | ||
3fb588a0 | 109 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'luks', 'file': "this doesn't exist", 'size': 67108864}}} |
5ba141dc KW |
110 | {u'return': {}} |
111 | Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist | |
112 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
113 | {u'return': {}} | |
d06195e6 KW |
114 | |
115 | === Zero size === | |
116 | ||
3fb588a0 | 117 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'iter-time': 10, 'driver': 'luks', 'file': 'node0', 'size': 0}}} |
5ba141dc KW |
118 | {u'return': {}} |
119 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
120 | {u'return': {}} | |
d06195e6 | 121 | |
5ba141dc | 122 | image: json:{"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_IMG"}, "key-secret": "keysec0"} |
d06195e6 KW |
123 | file format: IMGFMT |
124 | virtual size: 0 (0 bytes) | |
5ba141dc KW |
125 | encrypted: yes |
126 | Format specific information: | |
127 | ivgen alg: plain64 | |
128 | hash alg: sha256 | |
129 | cipher alg: aes-256 | |
130 | uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
131 | cipher mode: xts | |
132 | slots: | |
133 | [0]: | |
134 | active: true | |
135 | iters: XXX | |
136 | key offset: 4096 | |
137 | stripes: 4000 | |
138 | [1]: | |
139 | active: false | |
140 | key offset: 262144 | |
141 | [2]: | |
142 | active: false | |
143 | key offset: 520192 | |
144 | [3]: | |
145 | active: false | |
146 | key offset: 778240 | |
147 | [4]: | |
148 | active: false | |
149 | key offset: 1036288 | |
150 | [5]: | |
151 | active: false | |
152 | key offset: 1294336 | |
153 | [6]: | |
154 | active: false | |
155 | key offset: 1552384 | |
156 | [7]: | |
157 | active: false | |
158 | key offset: 1810432 | |
159 | payload offset: 2068480 | |
160 | master key iters: XXX | |
d06195e6 KW |
161 | |
162 | === Invalid sizes === | |
163 | ||
3fb588a0 | 164 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 18446744073709551104L}}} |
5ba141dc KW |
165 | {u'return': {}} |
166 | Job failed: The requested file size is too large | |
167 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
168 | {u'return': {}} | |
169 | ||
3fb588a0 | 170 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 9223372036854775808L}}} |
5ba141dc KW |
171 | {u'return': {}} |
172 | Job failed: The requested file size is too large | |
173 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
174 | {u'return': {}} | |
d06195e6 | 175 | |
3fb588a0 | 176 | {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'key-secret': 'keysec0', 'driver': 'luks', 'file': 'node0', 'size': 9223372036854775296}}} |
5ba141dc KW |
177 | {u'return': {}} |
178 | Job failed: The requested file size is too large | |
179 | {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} | |
180 | {u'return': {}} | |
50880f25 KW |
181 | |
182 | === Resize image with invalid sizes === | |
183 | ||
5ba141dc KW |
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"} | |
50880f25 KW |
193 | file format: IMGFMT |
194 | virtual size: 0 (0 bytes) | |
5ba141dc KW |
195 | encrypted: yes |
196 | Format specific information: | |
197 | ivgen alg: plain64 | |
198 | hash alg: sha256 | |
199 | cipher alg: aes-256 | |
200 | uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
201 | cipher mode: xts | |
202 | slots: | |
203 | [0]: | |
204 | active: true | |
205 | iters: XXX | |
206 | key offset: 4096 | |
207 | stripes: 4000 | |
208 | [1]: | |
209 | active: false | |
210 | key offset: 262144 | |
211 | [2]: | |
212 | active: false | |
213 | key offset: 520192 | |
214 | [3]: | |
215 | active: false | |
216 | key offset: 778240 | |
217 | [4]: | |
218 | active: false | |
219 | key offset: 1036288 | |
220 | [5]: | |
221 | active: false | |
222 | key offset: 1294336 | |
223 | [6]: | |
224 | active: false | |
225 | key offset: 1552384 | |
226 | [7]: | |
227 | active: false | |
228 | key offset: 1810432 | |
229 | payload offset: 2068480 | |
230 | master key iters: XXX | |
231 |