Einav Cohen has posted comments on this change.

Change subject: restapi : call to show files on iso domain no longer shows all 
files
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetImagesListQuery.java
Line 18:     protected List<RepoFileMetaData> 
getUserRequestForStorageDomainRepoFileList() {
Line 19:         if (getParameters().getImageType().equals(ImageType.All)) {
Line 20:             List<RepoFileMetaData> fileList = new 
ArrayList<RepoFileMetaData>();
Line 21:             fileList.addAll(getFileListForExtension(ImageType.ISO));
Line 22:             fileList.addAll(getFileListForExtension(ImageType.Floppy));
IIRC, this query was created in order to supply the contents for the 
images/ISOs/? (cannot recall the exact name) sub-tab in the Storage main tab 
that appears when an ISO storage-domain is selected in the main Storage grid. 

All images are displayed in this sub-tab (with a column for the image type: 
Floppy/CD); theoretically (maybe already practically - don't know), there can 
be additional image types, therefore splitting the query to two queries might 
not be ideal here: the GUI would then have to call to two queries and combine 
the results in order to create the contents of a single grid; moreover, if/when 
a new image(s) type will be introduced, a new query would have to be 
introduced. 

I think that a single query that accepts the ImageType as a parameter is the 
best approach here, so when a new image type is introduced, only the ImageType 
enum is updated (and no new query needs to be introduced).
Line 23:             return fileList;
Line 24:         }
Line 25:         return getFileListForExtension(getParameters().getImageType());
Line 26:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I31d305baaa28e5c0f0b918e497197dbd7b0e496e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to