
Tomas Jelinek has submitted this change and it was merged. Change subject: core: RFE: allow to define deletion protection per vm ...................................................................... core: RFE: allow to define deletion protection per vm This patch introduces protection from unwanted deletion of VMs/Templates. Each VM/Template will have a boolean flag representing if the VM/Template is delete protected. If this flag is set to true, the backend will prevent deletion of corresponding entity. On backend it affects - vm_static table in database will have a new boolean column "delete_protected" with default value FALSE - Ovf export/import - new field DeleteProtected - corresponding entities, db classes (DAOs, row mapper) Change-Id: I878f32506e0aececb7947b2db5c63cf0cc0980b5 Signed-off-by: Frantisek Kobzik <fkobzik@redhat.com> Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=871371 --- M backend/manager/dbscripts/create_views.sql A backend/manager/dbscripts/upgrade/03_01_1540_add_delete_protection.sql M backend/manager/dbscripts/vm_templates_sp.sql M backend/manager/dbscripts/vms_sp.sql M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java 21 files changed, 89 insertions(+), 22 deletions(-) Approvals: Tomas Jelinek: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/9404 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I878f32506e0aececb7947b2db5c63cf0cc0980b5 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkobzik@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkobzik@redhat.com> Gerrit-Reviewer: Itamar Heim <iheim@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjelinek@redhat.com>