Allon Mureinik has submitted this change and it was merged.
Change subject: core: Added RegisterDiskCommand and GetUnregisteredDisksQuery
......................................................................
core: Added RegisterDiskCommand and GetUnregisteredDisksQuery
I am working on a plugin for NetApp storage systems that will
use its cloning capabilities to clone disks outside of oVirt.
This new query and command will allow us to discover and register
those disks in oVirt so that we can attach them to copies of the
original VM.
This change set adds a new VDS command, GetVolumesList that
already existed in the VDSM API but was not exposed in oVirt.
The functionality to query for new disk images uses a new
GetUnregisteredDisks query. This returns the list of unregistered
images. The GetVolumesList and GetImageInfo VDS commands are used to
populate the disk images that are then added to the oVirt DB
through the new RegisterDiskCommand.
There are some assumptions made in that images that contain
snapshots will not be imported as we don't have the associated
snapshot metadata. Also, this is only supported on NFS storage
domains.
When querying to find the storage pool associated with the
storage domain, I found that it returned a list of storage
pools. I am assuming that an NFS based storage domain would
only belong to a single storage pool and thus I took the first
item in the list. If this assumption is unfounded please note
in the review.
This change also implements the GET and POST methods for the
REST /api/storagedomains/{storagedomain:id}/disks;unregistered
resource. These depend on the new RegisterDiskCommand and
GetUnregisteredDisksQuery.
Change-Id: I82de498fd9a8e25ed9e1dc5776f2fdf0c35b46da
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=886133
Signed-off-by: Chris Morrissey <cmorriss(a)netapp.com>
---
A
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDiskQuery.java
A
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDisksQuery.java
A
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterDiskCommand.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetUnregisteredDisksQueryTest.java
A
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RegisterDiskParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
A
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetUnregisteredDiskQueryParameters.java
A
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetUnregisteredDisksQueryParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
A
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/GetImagesListVDSCommandParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties
M
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAttachedStorageDomainResource.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAttachedStorageDomainsResource.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDiskResource.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDisksResource.java
M
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendBaseTest.java
M
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDiskResourceTest.java
M
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDisksResourceTest.java
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/GetImageInfoVDSCommand.java
A
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/GetImagesListVDSCommand.java
A
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/GetVolumesListVDSCommand.java
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IIrsServer.java
A
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/ImagesListReturnForXmlRpc.java
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsServerConnector.java
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsServerWrapper.java
A
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/UUIDListReturnForXmlRpc.java
30 files changed, 865 insertions(+), 62 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/11783
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I82de498fd9a8e25ed9e1dc5776f2fdf0c35b46da
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Chris Morrissey <cmorriss(a)netapp.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Chris Morrissey <cmorriss(a)netapp.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>