Roy Golan has posted comments on this change. Change subject: core: support adding template version ......................................................................
Patch Set 18: (3 comments) http://gerrit.ovirt.org/#/c/22738/18/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java: Line 72: protected Map<Guid, DiskImage> diskInfoDestinationMap; Line 73: protected Map<Guid, List<DiskImage>> sourceImageDomainsImageMap; Line 74: private boolean isVmInDb; Line 75: Line 76: private final String BASE_TEMPLATE_VERSION_NAME = "base version"; put a new line underneath Line 77: /** Line 78: * Constructor for command creation when compensation is applied on startup Line 79: * Line 80: * @param commandId Line 77: /** Line 78: * Constructor for command creation when compensation is applied on startup Line 79: * Line 80: * @param commandId Line 81: */ we should probably have a SHARED LOCK on the base template if exist. Line 82: protected AddVmTemplateCommand(Guid commandId) { Line 83: super(commandId); Line 84: } Line 85: Line 333: if (getParameters().getBaseTemplateId() != null) { Line 334: VmTemplate userSelectedBaseTemplate = getVmTemplateDAO().get(getParameters().getBaseTemplateId()); Line 335: if (userSelectedBaseTemplate == null) { Line 336: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST); Line 337: } else if (!userSelectedBaseTemplate.getBaseTemplateId().equals(userSelectedBaseTemplate.getId())) { here the isBaseVersion() method can come handy as well Line 338: // currently template version cannot be base template Line 339: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_VERSION_CANNOT_BE_BASE_TEMPLATE); Line 340: Line 341: } -- To view, visit http://gerrit.ovirt.org/22738 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id256ade6e3973d5ad00daa267f80e5ce42b87872 Gerrit-PatchSet: 18 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches