core: Change GetStorageDomainInfo return value

Use the new attribute in StorageDomainStatic to initialize SANState
instead of passing it in the Pair.
Also adding storagePoolId data from VDSM to the Pair result.

Change-Id: I60ca10fd579b6588d57b7ce590e424ee0f8cf75e
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Force detach a storage domain

Adding call for force detach Storage Domain before attaching the storage
domain, so the SP_UUID in the storage domain meta data will before
attaching it.

Change-Id: Ie75293678ab08616208128ac157426d3d98c1b77
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Add support to convert  json to Map

Adding support to convert jspn string retrieved from OVF disk to Map.

Change-Id: I31a837449de1d350dae7a94a69d5d62552474284
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Adding support for TarInMemoryExport

Adding a utility to retrieve OVF data of entities from a tar file.

Change-Id: Ie4fbc12337c16baca4be8a82d4a51b8b3ab0af4a
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Adding OVF utils

Adding OVF utils to parse OVF strings into OvfEntityData

Change-Id: I3f36ccf2f865d11ef3baa1908346aa3aab1857d5
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Use null check for unregistered dal insert

Architeture and LowestCompVersion are not part of the OVF.
This patch adds a validation so we will not get an NPE when trying to
insert new VMs/Templates from the OVF disk into the DB

Change-Id: I5e7328464c3038d9298723e947fbf262e74c9df6
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Initialize entities in DB from OVF disk on attach

Adding VMs and Templates from the most updated OVF store disk into the
unregistered entity table.
The operation of this is being done when the user attach a Storage Domain to the DC.

Change-Id: Ica68974916821ac1c9fbe6f43400170d19d716c9
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Use configuration for Import Storage Domain

Add a new configuration value for Import Storage Domain.
Import Storage Domain should be supported only for 3.5 Data Center.

Change-Id: I4b1824320223c915b97e0ea487abec285cea31e5
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Use formatter for AttachStorageDomainToPoolCommandTest

Use formatter for AttachStorageDomainToPoolCommandTest

Change-Id: I10c682a8cb123320da3e3cf2453ee1ea3a3091c5
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: update sp to initialize OVF data

update stored procedure at unregistered stored procedure to set the OVF
data from the DB, only if the ovf_data is null.

Change-Id: Ibee357b84da7fd7845792f975eaa72f99f16bd67
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Support architecture type at OvfUtils

Support set of architecture type when parsing the OVF from OVF Store
disks.

Change-Id: I77327c3487dc80533f6127258f05acae29914879
Signed-off-by: Maor Lipchuk <mlipchuk@redhat.com>
core: Adding support for detach storage from old pool

Adding a parameter for indication when we want to detach a storage
domain from its old pool in the meta data.

The vdsm action forcedDetachStorageDomain has been changed to indicate
that only domain with empty GUID pool id, will be forced detached in the
meta data.
This change in the engine is related to this change

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