CA-64962: Allow RO VDI to be copied as well

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>
CA-75697: Disallow VBD.create during VM migration

All manner of bad things happen if a VBD is created during a VM's migration, and such new VBDs bypass the checks that would normally happen before a migrate can start.

This patch raises an "other operation in progress" error if you try to create a VBD on a VM that's in the middle of a migration.

Example output:

  # xe vbd-create vdi-uuid=<vdi> vm-uuid=efc5e680-21a1-b0b5-7787-a49fe4ebec34 device=autodetect
  Another operation involving the object is currently in progress
  class: VM
  object: efc5e680-21a1-b0b5-7787-a49fe4ebec34 (demo)
  <extra>: pool_migrate

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
CA-83260: Raise API error when attaching RO disk VBD to HVM guest

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
CA-85032: disallow non-empty vif-maps in intra-pool (storage) migrations

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-84354: SXM fails when VM has snapshot

We weren't clearing the vdi_info.sm_config map when we created a new VDI on the
remote host for the snapshot VDI. The sm_config map still had the
host_OpaqueRef:... field, which caused blktap2.py to think that the VDI was
already attached and activated, when in fact it wasn't. We now clear the
sm_config map (although it is unclear whether clearing it is better than just
filtering the host_OpaqueRef key).

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-85972: Typo fix.

Signed-off-by: John Else <john.else@citrix.com>
CA-85775: Send a message when a new bond has some links down.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-71001: set xs-network-uuids on CHIN/tunnel ovs bridges

If the xs-network-uuids key on the bridge is not set correctly,
the controller is not able to create the tunnel ports.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-85775: Remove dead bonds from the cache.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Initial commit of new xapi unit test suite

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
MockDatabase.make_db creates a database properly

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
make all always runs unit tests (build fails if tests fail)

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Make database_test_main.ml compile again

It doesn't run, though :(

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Add more tests to test target

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
make_db doesn't need pool.conf anymore

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Clean up suite.ml

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
read_pool_role returns Broken if pool.conf doesn't exist

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-84344: Cleanup: rename "vm'" to "vm_uuid"

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-84344: Add some more detail to the xn vbd-list command

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-84344: Add a new fist point after the VDIs have been remapped

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>