Maor Lipchuk has posted comments on this change.

Change subject: core: Use import command to register a VM
......................................................................


Patch Set 20:

(2 comments)

http://gerrit.ovirt.org/#/c/27247/20/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java:

Line 243:             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMPORT_CLONE_NOT_COLLAPSED);
Line 244:         }
Line 245: 
Line 246:         if (isImagesAlreadyOnTarget() && 
getParameters().getCopyCollapse()) {
Line 247:             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_IMPORT_UNREGISTERED_NOT_COLLAPSED);
> Note that the combination of #242 and #246 means that we won't be able to i
copy-collapse is meaningless since the disk is already in the storage,
Perhaps it will be better to add to the condition in line 242 also the flag 
!isImagesAlreadyOnTarget()
Line 248:         }
Line 249: 
Line 250:         setSourceDomainId(getParameters().getSourceDomainId());
Line 251:         StorageDomainValidator validator = new 
StorageDomainValidator(getSourceDomain());


Line 610:         boolean verified = true;
Line 611:         if (!getParameters().isImportAsNewEntity() && 
!isImagesAlreadyOnTarget()) {
Line 612:             verified = checkIfDisksExist(imageList);
Line 613:         }
Line 614:         return verified;
> ok, so if we keep this method, can you please remove the 'verified' variabl
sure, done
Line 615:     }
Line 616: 
Line 617:     private boolean templateExists() {
Line 618:         if (getVmTemplate() == null && 
!getParameters().getCopyCollapse()) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5ee64651eb614feb6ac9d7fde88a4ee6348aff06
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[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