Michael Pasternak has posted comments on this change.
Change subject: core: Added RegisterDiskCommand and GetUnregisteredDisksQuery
......................................................................
Patch Set 4: (3 inline comments)
Well done Chris!,
two more issues to address:
1. tests for importing unregistered disk/s
2. minor inline comment
....................................................
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) {
you can save BackendStorageDomainDisksResource reference in this class and
reuse getStoragePoolIdForDomain() from there
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();
please use here getBackendCollection(Class<T> clz, VdcQueryType query,
VdcQueryParametersBase queryParams) method instead of manual query invocation.
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,
please use here getBackendCollection(Class<T> clz, VdcQueryType query,
VdcQueryParametersBase queryParams) method instead of manual query invocation.
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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Chris Morrissey <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches