1=== Successful image creation (defaults) === 2 3{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} 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.parallels'}} 9{u'return': {}} 10{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'imgfile', 'size': 134217728}}} 11{u'return': {}} 12{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 13{u'return': {}} 14 15image: TEST_IMG 16file format: IMGFMT 17virtual size: 128M (134217728 bytes) 18 19=== Successful image creation (explicit defaults) === 20 21{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} 22{u'return': {}} 23{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 24{u'return': {}} 25 26{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 1048576, 'driver': 'parallels', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}, 'size': 67108864}}} 27{u'return': {}} 28{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 29{u'return': {}} 30 31image: TEST_IMG 32file format: IMGFMT 33virtual size: 64M (67108864 bytes) 34 35=== Successful image creation (with non-default options) === 36 37{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}}} 38{u'return': {}} 39{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 40{u'return': {}} 41 42{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 65536, 'driver': 'parallels', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.parallels'}, 'size': 33554432}}} 43{u'return': {}} 44{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 45{u'return': {}} 46 47image: TEST_IMG 48file format: IMGFMT 49virtual size: 32M (33554432 bytes) 50 51=== Invalid BlockdevRef === 52 53{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': "this doesn't exist", 'size': 33554432}}} 54{u'return': {}} 55Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist 56{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 57{u'return': {}} 58 59=== Zero size === 60 61{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 0}}} 62{u'return': {}} 63{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 64{u'return': {}} 65 66image: TEST_IMG 67file format: IMGFMT 68virtual size: 0 (0 bytes) 69 70=== Maximum size === 71 72{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 4503599627369984}}} 73{u'return': {}} 74{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 75{u'return': {}} 76 77image: TEST_IMG 78file format: IMGFMT 79virtual size: 4096T (4503599627369984 bytes) 80 81=== Invalid sizes === 82 83{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 1234}}} 84{u'return': {}} 85Job failed: Image size must be a multiple of 512 bytes 86{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 87{u'return': {}} 88 89{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 18446744073709551104L}}} 90{u'return': {}} 91Job failed: Image size is too large for this cluster size 92{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 93{u'return': {}} 94 95{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775808L}}} 96{u'return': {}} 97Job failed: Image size is too large for this cluster size 98{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 99{u'return': {}} 100 101{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 9223372036854775296}}} 102{u'return': {}} 103Job failed: Image size is too large for this cluster size 104{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 105{u'return': {}} 106 107{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'parallels', 'file': 'node0', 'size': 4503599627370497}}} 108{u'return': {}} 109Job failed: Image size is too large for this cluster size 110{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 111{u'return': {}} 112 113=== Invalid cluster size === 114 115{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 1234, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} 116{u'return': {}} 117Job failed: Cluster size must be a multiple of 512 bytes 118{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 119{u'return': {}} 120 121{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 128, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} 122{u'return': {}} 123Job failed: Cluster size must be a multiple of 512 bytes 124{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 125{u'return': {}} 126 127{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 4294967296, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} 128{u'return': {}} 129Job failed: Cluster size is too large 130{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 131{u'return': {}} 132 133{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 9223372036854775808L, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} 134{u'return': {}} 135Job failed: Cluster size is too large 136{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 137{u'return': {}} 138 139{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 18446744073709551104L, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} 140{u'return': {}} 141Job failed: Cluster size is too large 142{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 143{u'return': {}} 144 145{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 0, 'driver': 'parallels', 'file': 'node0', 'size': 67108864}}} 146{u'return': {}} 147Job failed: Image size is too large for this cluster size 148{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 149{u'return': {}} 150 151{'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 512, 'driver': 'parallels', 'file': 'node0', 'size': 281474976710656}}} 152{u'return': {}} 153Job failed: Image size is too large for this cluster size 154{'execute': 'job-dismiss', 'arguments': {'id': 'job0'}} 155{u'return': {}} 156 157