CA-141526: Putting VBD path to /dev/xvdX for HVM guests

/dev/hda is anyways meaningless for HVM guest.So, we always populate the
VBD path to be /dev/xvdX.
Signed-off-by: Ravi Pandey <ravi.pandey@citrix.com>
CA-145413: xenopsd internal error: Unix.Unix_error(27, "rmdir", "/var/run/nonpersistent/xenops/extra")

FileFS.rm has a race condition in deleting emtpy dir when there're 2 or more vms are rebooting.
So let's use try-catch to delete empty dir.

Signed-off-by: Phus Lu <phus.lu@citrix.com>
Merge pull request #1921 from ravippandey/CA-141526

CA-141526: Putting VBD path to /dev/xvdX for HVM guests
Merge pull request #1925 from phusl/CA-145413

CA-145413: xenopsd internal error: Unix.Unix_error(27, "rmdir", "/var/run/nonpersistent/xenops/extra")
CA-143836: Add VDI.revert to SMAPI

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add VDI.revert API call

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Pass down correct values of is_a_snapshot/snapshot_of

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Allow VDI.revert operation for cloneable snapshots

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: During VDI.revert, mark leaf with operation `reverting

This mirrors the way allowed_operations are handled for VM.revert.

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add vdi_revert to SR allowed_operations

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add VDI.revert test to quicktest

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Use VDI.revert

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Allow reverting to "live" VDIs

Since we can only revert to snapshot VDIs, the only time this is needed
is when reverting to a checkpoint.

Signed-off-by: John Else <john.else@citrix.com>
unittest: Variable rename and label for clarity

Signed-off-by: John Else <john.else@citrix.com>
unittest: Get VDI record after tinkering with the VDI

This ensures that the up-to-date record is passed to
Xapi_vdi.check_operation_error.

Signed-off-by: John Else <john.else@citrix.com>
CA-143836: Add allowed_operations tests

Test that we...

* can revert to a snapshot.
* can revert to an attached snapshot.
* cannot revert to a leaf VDI.
* cannot revert to an attached leaf.

Signed-off-by: John Else <john.else@citrix.com>