Maor Lipchuk has posted comments on this change. Change subject: core: Re-extract validation to be used at the parent command. ......................................................................
Patch Set 1: (1 comment) @Arik It is related to Template and VM and since the only common parent is MoveOrCopy I moved it to this file. This all hierarchy needs design refactoring, I have opened an RFE to make it much more neat, it should be targeted to 3.6 http://gerrit.ovirt.org/#/c/28515/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java: Line 160: setStorageDomainId(ovfEntityData.getStorageDomainId()); Line 161: if (!validate(new StorageDomainValidator(getStorageDomain()).isDomainExistAndActive())) { Line 162: return false; Line 163: } Line 164: setImagesWithStoragePoolId(getStorageDomain().getStoragePoolId(), getVm().getImages()); > getVm() won't be null for the import template command? yes, you are right, I will remove it from this command Line 165: if (!getStorageDomain().getStorageDomainType().isDataDomain()) { Line 166: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_UNSUPPORTED, Line 167: String.format("$domainId %1$s", getParameters().getStorageDomainId()), Line 168: String.format("$domainType %1$s", getStorageDomain().getStorageDomainType())); -- To view, visit http://gerrit.ovirt.org/28515 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic25f6f086fe3a8a55de33529a6fb92728d3e0d74 Gerrit-PatchSet: 1 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
