Maor Lipchuk has posted comments on this change.
Change subject: core: Refactor method to handler
......................................................................
Patch Set 4: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 108: log.errorFormat("Disk object is null, the suggested
default disk alias to be used is %1$s",
Disk should not be null, this is a bad behaviour, but since we continue with
the flow it might be a better idea to use warn here.
This method should be called mainly before saving a disk to the DB, it is a
varification that the disk alias was set in the disk and if not, it will set
the deafult disk_alias name.
You can see the use of this method in the last patch of the patch set when I
set the disk alias (core:Add support for disk alias to commands).
Line 113: diskAlias = getDefaultDiskAlias(diskPrefix, new
Integer(disk.getInternalDriveMapping()).toString());
the internal drive mapping is primitive int, String constructor does not
support int as a variable.
Although now that you mentioned it String.valueOf might be good to use here, so
I will change it to String.valueOf instead.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
Line 106: List<Integer> vmDisks =
LinqUtils.foreach(vm.getDiskMap().keySet(), new Function<String, Integer>() {
I'm not sure its better to change this logic now, in the patch set, its already
a preety big patch set with scripts in it.
I can change this right after I will push this change.
--
To view, visit http://gerrit.ovirt.org/3069
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I76c979644b22aa1528cd061342c3e335a31121c7
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches