Omer Frenkel has posted comments on this change. Change subject: core: support adding template version ......................................................................
Patch Set 3: (3 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java Line 321: if (baseTemplate == null) { Line 322: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST); Line 323: } else if (!baseTemplate.getBaseTemplateId().equals(baseTemplate.getId())) { Line 324: // currently template version cannot be base template Line 325: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_VERSION_CANNOT_BE_BASE_TEMPLATE); we decided not to support nested versioning (updated the wiki now) since there is no use case and it adds some complexity, also might be confusing to the user. this check comes to enforce this, we want to make sure that the base template the user selected is a template, and not a version this is why i check here: if base.baseId == base.id this ensure that the base is not a version, as for versions baseId == someOtherTemplateId hope this is more clear, do you have an idea to make the code better? Line 326: Line 327: } Line 328: } Line 329: .................................................... File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties Line 215: ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_IMAGE=Cannot ${action} ${type}. Removing the VM active Snapshot is not allowed. Line 216: ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO=Cannot ${action} ${type}. Failed to get data for Import operation.\n\ Line 217: - Check your Import Domain. Line 218: ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Template doesn't exist. Line 219: ACTION_TYPE_FAILED_TEMPLATE_VERSION_CANNOT_BE_BASE_TEMPLATE=Cannot ${action} ${type}. Template version cannot be used as base for other template version, please use base templates only. how about: Version of template cannot be used to create template version, please only use templates to create versions. or Nested versions are not supported, please only use templates to create versions. Line 220: ACTION_TYPE_FAILED_INSTANCE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Instance Type doesn't exist. Line 221: ACTION_TYPE_FAILED_IMAGE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Image Type doesn't exist. Line 222: ACTION_TYPE_FAILED_TEMPLATE_IS_DISABLED=Cannot ${action} ${type}. The Template is disabled, please try to enable the template first and try again. Line 223: ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS=Cannot ${action} ${type}. One of the Template Images already exists. .................................................... File frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties Line 211: ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_IMAGE=Cannot ${action} ${type}. Removing the VM active Snapshot is not allowed. Line 212: ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO=Cannot ${action} ${type}. Failed to get data for Import operation.\n\ Line 213: - Check your Import Domain. Line 214: ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Template doesn't exist. Line 215: ACTION_TYPE_FAILED_TEMPLATE_VERSION_CANNOT_BE_BASE_TEMPLATE=Cannot ${action} ${type}. Template version cannot be used as base for other template version, please use base templates only. i guess that for power user portal yes Line 216: ACTION_TYPE_FAILED_INSTANCE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Instance Type doesn't exist. Line 217: ACTION_TYPE_FAILED_IMAGE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Image Type doesn't exist. Line 218: ACTION_TYPE_FAILED_TEMPLATE_IS_DISABLED=Cannot ${action} ${type}. The Template is disabled, please try to enable the template first and try again. Line 219: ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS=Cannot ${action} ${type}. One of the Template Images already exists. -- 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: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@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