CA-129192: Restore metadata for all SR

Revise restore-sr-metadata.py so that it could restore metadata for all SR
with command line:
   ./restore-sr-metadata.py -f <input file> -u all
or just omit the sr-uuid:
   ./restore-sr-metadata.py -f <input file>

xe-restore-metadata is modified accordingly.

Signed-off-by: Kaifeng Zhu <kaifeng.zhu@citrix.com>
CA-125187: Add copy to VDI current_operations

Signed-off-by: John Else <john.else@citrix.com>
CA-125187: VBD allowed_operations fix

VBD allowed_operations checks should ignore running VDI.copy operations.
This wasn't needed before as VDIs weren't marked with the copy
operation.

Signed-off-by: John Else <john.else@citrix.com>
CA-125187: Don't automatically dismiss VDI operations during copy

We still want to allow VDI.snapshot while a VDI is being copied, as
well as multiple parallel copies.

Signed-off-by: John Else <john.else@citrix.com>
CA-126097: Block clone of live VDIs

Signed-off-by: John Else <john.else@citrix.com>
Fix test case name

Signed-off-by: John Else <john.else@citrix.com>
test VDIs should default to not sharable

Signed-off-by: John Else <john.else@citrix.com>
Improve readability of VDI allowed_operations test failures

Signed-off-by: John Else <john.else@citrix.com>
Add a case to a unit test

Signed-off-by: John Else <john.else@citrix.com>
Test that concurrent copies are allowed

Signed-off-by: John Else <john.else@citrix.com>
Add tests for clone/snapshot of VDIs during copying

Signed-off-by: John Else <john.else@citrix.com>
Add a test for VBD.allowed_operations

Test that a VBD.plug is not blocked by the VDI.copy which triggered it.

Signed-off-by: John Else <john.else@citrix.com>
CA-125187: Add explanation of the new behaviour

Signed-off-by: John Else <john.else@citrix.com>
CA-130011:Prevent xapi from filling it's buffer and running out of
memory while reading from an invalid device file
Signed-off-by: Akshay <akshay.ramani@citrix.com>
Merge pull request #1664 from kaifengz/CA-129192

CA-129192: Restore metadata for all SR
CA-130161: Revert "CA-126097: Block clone of live VDIs"

Disks attached to a checkpoint look like they're live, so blocking clone
of live VDIs broke checkpoint revert.

This reverts commit a8aece189b38095c74a6e3b0aee3d8d255e42248.
CA-130161: Fix unit tests to test new behaviour

We've re-enabled clone of live VDIs, so the test needs to check this
instead of expecting failure.

Asserting whether a VDI can be cloned checks whether the backend
supports VDI_CLONE, so register the dummy SR with a dummy backend which
has a sensible set of features.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1670 from akshayramani/XOP-529.a

CA-130011:Prevent xapi from filling it's buffer and running out of
CA-130748: Bumping down the xencenter max version to 2.1

Signed-off-by: Ravi Pandey <ravi.pandey@citrix.com>
Merge pull request #1809 from ravippandey/CA-130748

[SCTX-1849] CA-130748: Bumping down the xencenter max version to 2.1