On Tue, Mar 15, 2011 at 1:27 PM, Anthony Liguori <anth...@codemonkey.ws> wrote: > # create a blockdev using probing without relying on implicit keys and > allowing unsafe probing > -blockdev > format.probe.unsafe=on,format.probe.protocol.file.filename=my-image.qcow2,id=ide0-hd0
This is a programmer's user interface :). I don't think typing format.probe.protocol.file.filename will make sense to users. I don't want to have to learn about 4 sub-objects in order to set the image filename. I would much prefer: -blockdev filename=my-image.qcow2,id=id0-hd0,format=probe > It looks less awkward in config file format: > > [blockdev] > id = "ide0-hd0" > format.qcow2.protocol.nbd.hostname = localhost > format.qcow2.protocol.nbd.port = 1025 > format.qcow2.backing-file.format.qed.protocol.nbd.hostname = localhost > format.qcow2.backing-file.format.qed.protocol.nbd.port = 1026 Here is the alternative if we don't support composition: [blockdev] id = "nbd-1025" protocol = "nbd" hostname = "localhost" port = 1025 [blockdev] id = "nbd-1026" protocol = "nbd" hostname = "localhost" port = 1026 [blockdev] id = "qed-nbd-1026" format = "qed" image = "nbd-1026" [blockdev] id = "ide0-hd0" format = "qcow2" image = "nbd-1025" backing_file = "qed-nbd-1026" I like the simplicity but it becomes so verbose that it is hard to see what is going on. Actually I think it's INI syntax's fault: blockdev id=nbd-1025,protocol=nbd,hostname=localhost,port=1025 blockdev id=nbd-1026,protocol=nbd,hostname=localhost,port=1026 blockdev id=qed-nbd-1026,format=qed,image=nbd-1026 blockdev id=ide0-hd0,format=qcow2,image=nbd-1025,backing_file=qed-nbd-1026 Perhaps the best compromise is to keep composition but implement shortcuts as suggested by Markus. Stefan