Am 13.03.2012 21:48, schrieb Eric Blake: > On 03/06/2012 10:56 AM, Paolo Bonzini wrote: >> From: Federico Simoncelli <fsimo...@redhat.com> >> >> Signed-off-by: Federico Simoncelli <fsimo...@redhat.com> >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > >> ## >> +# @drive-reopen >> +# >> +# Assigns a new image file to a device. >> +# >> +# @device: the name of the device for which we are changing the image file. >> +# >> +# @new-image-file: the target of the new image. If the file doesn't exists >> the >> +# command will fail. >> +# >> +# @format: #optional the format of the new image, default is 'qcow2'. >> +# >> +# Returns: nothing on success >> +# If @device is not a valid block device, DeviceNotFound >> +# If @new-image-file can't be opened, OpenFileFailed >> +# If @format is invalid, InvalidBlockFormat >> +# >> +# Since 1.1 >> +## >> +{ 'command': 'drive-reopen', >> + 'data': { 'device': 'str', 'new-image-file': 'str', '*format': 'str' } } > > I still think we need a 'drive-reopen' action included in 'transaction', > as an 11/10 on this series.
If we want to do this, it needs to be the same patch, as we couple the transaction actions with top-level commands as long as there is no other way to discover the possible actions. And it probably makes more sense anyway, because the top-level command would be just a thin wrapper around the transactional one. Only problem is that just moving the code there doesn't make it suitable for a transaction and doing an all-or-nothing drive-reopen isn't quite trivial. Kevin