core: Re-extract validation to parent command.

Re-extract the same validation logic from ImportVm and ImportVmTemplate configuration,
to be used in one method at MoveOrCopyTemplateCommand.

Change-Id: Ic25f6f086fe3a8a55de33529a6fb92728d3e0d74
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Use formatter in ImportVmFromConfigurationCommand

Change-Id: I6db67cd19bf69ef3d9cf497d5d802de312009701
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Remove business logic of MSD validation for detach

Remove message and validation for entities with disks on multiple
storage domains, since this should be valid now.

Change-Id: Ieb0115e4c8fb22f61c69f2cdd0c92c06adb2bcd5
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Use validation on entites related to one SD.

Remove all the entities which are related to multiple Storage Domains
from the list of Vms/Templates which we validate.

VM/Template with multiple disks on different Storage Domain will not be deleted from the engine
but instead will be kept in the engine without the disks related to it.

Change-Id: I9bc46616a164e6d6ec87fbd4ac67f84823bec4de
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core:Force remove should not delete VMs/Tempaltes with MSD.

When the admin chooses to force destroy a storage domain, the operation
should remove all the entities related to the Data Storage Domain.

Since version 3.1 we have added the ability for VMs to have disks on multiple storage domains.
Today, when using force reomve on Storage Domain,
we also remove VMs/Templates with disks on multiple storage domains,
those disks on the other data storage domains are left as floating disks in the system,
even though they might contain snapshots of the deleted VM/Template.

This patch fix this behaviour by leaving the VMs/Templates with disks on MSD,
when using force remove.
It also deletes the devices which are related to those VMs/Templates,
since until now those devices were deleted also with the VM/Template.

Change-Id: Ic222ee55a711ea9101bf20ac812219714f70aab3
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1108242
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Support MSD when importing a VM from configuration

Using validation for active storage domain on all the Storage Domains
which the images are based on.
Also adding support for unregistered Template/VM with disks on MSD.

Change-Id: I067b6186c2a2b7d77394e9cb0a4e8f023c168e4b
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>