Moti Asayag has posted comments on this change.

Change subject: core: Add cinder helper method for Cinder disks
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/40675/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CINDERStorageHelper.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/CINDERStorageHelper.java:

Line 141:     public void deactivateCinderDomain(Guid storageDomainId, Guid 
storagePoolId) {
Line 142:         updateCinderDomainStatus(storageDomainId, storagePoolId, 
StorageDomainStatus.Maintenance);
Line 143:     }
Line 144: 
Line 145:     public static SubjectEntity[] 
getStorageEntitiesForCoco(List<CinderDisk> cinderDisks) {
s/getStorageEntitiesForCoco/getStorageEntities

ForCoco kind of limits this method usages and the method shouldn't presume who 
is designed to use it.

an alternative name could be 
  createStorageCommandAssociatedEntities(List)
Line 146:         Set<SubjectEntity> storageSubjects = new HashSet<>();
Line 147:         for (final CinderDisk cinderDisk : cinderDisks) {
Line 148:             SubjectEntity se = new 
SubjectEntity(VdcObjectType.Storage, cinderDisk.getStorageIds().get(0));
Line 149:             storageSubjects.add(se);


Line 151: SubjectEntity[] subjectEntities = new 
SubjectEntity[storageSubjects.size()];
        :         storageSubjects.toArray(subjectEntities);
        :         return subjectEntities;
the 3 lines could be replaced with:
 return storageSubjects.toArray(new SubjectEntity[storageSubjects.size()]);


-- 
To view, visit https://gerrit.ovirt.org/40675
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I59afc1d6814ccdf343615322f758bd473482a296
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to