Allon Mureinik has posted comments on this change.

Change subject: core: Report storage size closer to reality
......................................................................


Patch Set 8: Code-Review-1

(3 comments)

https://gerrit.ovirt.org/#/c/37428/8/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabStorageView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabStorageView.java:

Line 112:         AbstractStorageSizeColumn<StorageDomain> totalSpaceColumn = 
new AbstractStorageSizeColumn<StorageDomain>() {
Line 113:             @Override
Line 114:             public Long getRawValue(StorageDomain object) {
Line 115:                 Integer totalSpace = object.getTotalDiskSize();
Line 116:                 return totalSpace == null ? null : (long) totalSpace;
Let's save another useless conversion - please use Long.valueOf(totalSpace) 
instead of casting
Line 117:             }
Line 118:         };
Line 119:         getTable().addColumn(totalSpaceColumn, 
constants.totalSpaceStorage(), "130px"); //$NON-NLS-1$
Line 120: 


Line 121:         AbstractStorageSizeColumn<StorageDomain> freeSpaceColumn = 
new AbstractStorageSizeColumn<StorageDomain>() {
Line 122:             @Override
Line 123:             public Long getRawValue(StorageDomain object) {
Line 124:                 Integer availableDiskSize = 
object.getAvailableDiskSize();
Line 125:                 return availableDiskSize == null ? null :(long) 
availableDiskSize;
same here
Line 126:             }
Line 127:         };
Line 128:         
freeSpaceColumn.makeSortable(StorageDomainFieldAutoCompleter.SIZE);
Line 129:         getTable().addColumn(freeSpaceColumn, 
constants.freeSpaceStorage(), "130px"); //$NON-NLS-1$


https://gerrit.ovirt.org/#/c/37428/8/packaging/dbscripts/upgrade/03_06_1070_set_glance_sotrage_size_to_NA.sql
File packaging/dbscripts/upgrade/03_06_1070_set_glance_sotrage_size_to_NA.sql:

Line 2: SET    available_disk_size = NULL, used_disk_size = NULL
Line 3: FROM   storage_domain_static, providers
Line 4: WHERE  storage_domain_dynamic.id = storage_domain_static.id AND
Line 5:        storage_domain_static.storage = CAST(providers.id AS VARCHAR) AND
Line 6:        provider_type = 'OPENSTACK_IMAGE';_
* You have a redundant "_" at the end
* Will this catch both Cinder and Glance?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I758febd3b6b1a1f13ae4e48635bf185ea81d918b
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Idan Shaby <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to