On 28/05/12 12:59, Michael Pasternak wrote:
Currently 'restore snapshot' done in two steps on a client side:
1. TryBackToAllSnapshotsOfVm
2. RestoreAllSnapshots
This implementation creates race condition on 1 and therefore unstable & bug prone,
i suggested refactoring 2 to include 1 as single atomic operation at backend.
Hi Michael,
The two commands above are used for functionality that is needed
regardless of the functionality you are looking for.
We want to present the user the option to preview a snapshot without
committing to it and without loosing the current snapshot.
I think we need to model the the two options above in the REST, it is
functionality that is used in the UI.
What you are looking for is a functionality 'restore to snapshot', this
functionality does not exist in the engine in a single step, and I think
that because we assumed that the user can get it in two steps It wasn't
prioritize so far.
Implementing the missing functionality with the two functions above is
a compromise that was done in the API.
To summarize I think the requirement you present is a missing
functionality in the engine and solving it is not about refactoring the
two existing verbs into one.
Thanks, Livnat