Daniel Erez has uploaded a new change for review.

Change subject: <core | restapi | tools | history | engine | userportal | 
webadmin>: short summary under 50 chars
......................................................................

<core | restapi | tools | history | engine | userportal | webadmin>: short 
summary under 50 chars

Longer description using lines' length under 72 chars.

With multiple paragraphs if necessary.

Change-Id: I136033caa9af9c8d2299b1020b5f31f23f612827
Bug-Url: https://bugzilla.redhat.com/??????
Signed-off-by: Daniel Erez <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetUnregisteredBlockStorageDomainsQuery.java
1 file changed, 45 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/65/29165/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetUnregisteredBlockStorageDomainsQuery.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetUnregisteredBlockStorageDomainsQuery.java
index 17ac230..e386e8c 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetUnregisteredBlockStorageDomainsQuery.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetUnregisteredBlockStorageDomainsQuery.java
@@ -68,6 +68,11 @@
         getQueryReturnValue().setReturnValue(returnValue);
     }
 
+    /**
+     * Connect to the targets (StorageServerConnections) specified in the 
parameters.
+     *
+     * @return A list of targets that's been successfully connected.
+     */
     private List<StorageServerConnections> connectTargets() {
         List<StorageServerConnections> connectedTargets = new ArrayList<>();
 
@@ -91,6 +96,11 @@
         return connectedTargets;
     }
 
+    /**
+     * Get devices (LUNs) that are visible by the host.
+     *
+     * @return the list of LUNs.
+     */
     private List<LUNs> getDeviceList() {
         List<LUNs> luns = new ArrayList<>();
         VdcQueryReturnValue returnValue = 
getBackend().runInternalQuery(VdcQueryType.GetDeviceList,
@@ -105,6 +115,14 @@
         return luns;
     }
 
+    /**
+     * Filter out LUNs that aren't part of the specified targets.
+     *
+     * @param luns the LUNs list
+     * @param targets the targets list
+     *
+     * @return the relevant LUNs list
+     */
     private List<LUNs> filterLUNsByTargets(List<LUNs> luns, final 
List<StorageServerConnections> targets) {
         // Targets should be null only when using StorageType.FCP
         if (targets == null) {
@@ -126,6 +144,13 @@
         });
     }
 
+    /**
+     * Filter out LUNs that are already a part of storage domains exist in the 
system.
+     *
+     * @param luns the LUNs list
+     *
+     * @return the relevant LUNs list
+     */
     private List<LUNs> filterLUNsThatBelongToExistingStorageDomains(List<LUNs> 
luns) {
         List<StorageDomain> existingStorageDomains = 
getDbFacade().getStorageDomainDao().getAll();
         final List<Guid> existingStorageDomainIDs = 
Entities.getIds(existingStorageDomains);
@@ -138,6 +163,13 @@
         });
     }
 
+    /**
+     * Retrieve the volume group ID associated with each LUN in the specified 
list.
+     *
+     * @param luns the LUNs list
+     *
+     * @return volume group IDs
+     */
     private List<String> getVolumeGroupIdsByLUNs(List<LUNs> luns) {
         Set<String> vgSet = new HashSet<>();
         for (LUNs lun : luns) {
@@ -149,6 +181,13 @@
         return new ArrayList<>(vgSet);
     }
 
+    /**
+     * Create StorageDomain objects according to the specified VG-IDs list.
+     *
+     * @param vgIDs the VG-IDs list
+     *
+     * @return storage domains list
+     */
     private List<StorageDomain> getStorageDomainsByVolumeGroupIds(List<String> 
vgIDs) {
         List<StorageDomain> storageDomains = new ArrayList<>();
         for (String vgID : vgIDs) {
@@ -171,6 +210,12 @@
         return storageDomains;
     }
 
+    /**
+     * Retrieve a storage domain using a specified storage domain ID.
+     *
+     * @param storageDomainId the domain's ID
+     * @return the storage domain
+     */
     private StorageDomain getStorageDomainByVgName(Guid storageDomainId) {
         VDSReturnValue returnValue = 
getVdsBroker().RunVdsCommand(VDSCommandType.HSMGetStorageDomainInfo,
                 new 
HSMGetStorageDomainInfoVDSCommandParameters(getParameters().getVdsId(), 
storageDomainId));


-- 
To view, visit http://gerrit.ovirt.org/29165
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I136033caa9af9c8d2299b1020b5f31f23f612827
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to