ofri masad has posted comments on this change. Change subject: core: Added "scan" to disks resource to import clones ......................................................................
Patch Set 2: (2 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportImageCommand.java Line 6: import org.ovirt.engine.core.dal.VdcBllMessages; Line 7: Line 8: @InternalCommandAttribute Line 9: @NonTransactiveCommandAttribute(forceCompensation=true) Line 10: public class ImportImageCommand <T extends ImportImageParameters> extends BaseImagesCommand<T> { If I understand correctly, this command will add a new image to the engine DB. that means the image must be accounted in the Quota mechanism. Implement the StorageQuotaDependent interface to make sure the QuotaManager is aware of this image adding. Line 11: Line 12: private static final long serialVersionUID = -1201881996330878181L; Line 13: Line 14: public ImportImageCommand(T parameters) { .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java Line 106: RemoveSnapshot(210, ActionGroup.MANIPULATE_VM_SNAPSHOTS, QuotaDependency.STORAGE), Line 107: RemoveImage(211, QuotaDependency.STORAGE), Line 108: RemoveAllVmImages(212, QuotaDependency.STORAGE), Line 109: AddImageFromScratch(213, QuotaDependency.STORAGE), Line 110: ImportImage(214, ActionGroup.CONFIGURE_VM_STORAGE, QuotaDependency.NONE), If I understand correctly, this command will add a new image to the engine DB. that means the image must be accounted in the Quota mechanism. Set QuotaDependency to STORAGE to make sure the QuotaManager is aware of this image adding. Line 111: RemoveTemplateSnapshot(215, QuotaDependency.STORAGE), Line 112: RemoveAllVmTemplateImageTemplates(216, QuotaDependency.STORAGE), Line 113: ScanDomain(217, ActionGroup.CONFIGURE_VM_STORAGE, QuotaDependency.NONE), Line 114: TryBackToAllSnapshotsOfVm(223, ActionGroup.MANIPULATE_VM_SNAPSHOTS, QuotaDependency.NONE), -- To view, visit http://gerrit.ovirt.org/9603 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6236e563d38ee1a793bd94ff60587f19b3010d1 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Chris Morrissey <cmorr...@netapp.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Chris Morrissey <cmorr...@netapp.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Eduardo <ewars...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Ori Liel <ol...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: ofri masad <oma...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches