Chris Morrissey has posted comments on this change. Change subject: core: Added RegisterDiskCommand and GetUnregisteredDisksQuery ......................................................................
Patch Set 4: (4 inline comments) I have fixes for all the comments including a new test case for adding an unregistered disk. However, the test case seemed to be using the wrong resource to test against and when I changed it to an instance of BackendStorageDomainDisksResource several of the other tests broke. Waiting to hear back from Michael on which is correct and how to proceed. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDisksQuery.java Line 47: unregQueryParams); Line 48: if (unregQueryReturn.getSucceeded()) { Line 49: unregisteredDisks.add((Disk) unregQueryReturn.getReturnValue()); Line 50: } else { Line 51: log.error("Could not get populated disk, reason: " + unregQueryReturn.getExceptionString()); How about "Unable to register disk <disk id>, reason: " + reason? Line 52: } Line 53: } Line 54: getQueryReturnValue().setReturnValue(unregisteredDisks); Line 55: } .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDiskResource.java Line 65: public String getStorageDomainId() { Line 66: return storageDomainId; Line 67: } Line 68: Line 69: protected Guid getStoragePoolIdForDomain(Guid storageDomainId) { Good idea. I changed the constructor to take a reference to the parent and use that to cal getStoragePoolIdForDomain(). Line 70: // Retrieve the storage pools for the storage domain. Line 71: StorageDomainQueryParametersBase params = new StorageDomainQueryParametersBase(storageDomainId); Line 72: params.setSessionId(getSessionHelper().getSessionId()); Line 73: VdcQueryReturnValue returnValue = getBackend().RunQuery(VdcQueryType.GetStoragePoolsByStorageDomainId, Line 72: params.setSessionId(getSessionHelper().getSessionId()); Line 73: VdcQueryReturnValue returnValue = getBackend().RunQuery(VdcQueryType.GetStoragePoolsByStorageDomainId, Line 74: params); Line 75: @SuppressWarnings("unchecked") Line 76: List<storage_pool> storagePools = (List<storage_pool>) returnValue.getReturnValue(); Done. Line 77: Line 78: if (storagePools != null && !storagePools.isEmpty()) { Line 79: // Take the first storage pool. We should only be running on NFS domains and thus should only have a single Line 80: // storage pool to deal with. .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainDisksResource.java Line 97: protected Guid getStoragePoolIdForDomain(Guid storageDomainId) { Line 98: // Retrieve the storage pools for the storage domain. Line 99: StorageDomainQueryParametersBase params = new StorageDomainQueryParametersBase(storageDomainId); Line 100: params.setSessionId(getSessionHelper().getSessionId()); Line 101: VdcQueryReturnValue returnValue = getBackend().RunQuery(VdcQueryType.GetStoragePoolsByStorageDomainId, Done. Line 102: params); Line 103: @SuppressWarnings("unchecked") Line 104: List<storage_pool> storagePools = (List<storage_pool>) returnValue.getReturnValue(); Line 105: -- To view, visit http://gerrit.ovirt.org/11783 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I82de498fd9a8e25ed9e1dc5776f2fdf0c35b46da Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Chris Morrissey <cmorr...@netapp.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Chris Morrissey <cmorr...@netapp.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches