Vered Volansky has posted comments on this change. Change subject: core: Template's empty string as a disk alias fix. ......................................................................
Patch Set 3: (7 comments) http://gerrit.ovirt.org/#/c/34256/3//COMMIT_MSG Commit Message: Line 6: Line 7: core: Template's empty string as a disk alias fix. Line 8: Line 9: While making a new template based on a VM, providing the template's Line 10: allocated disks's alias as an empty string is now disabled. the user s/disks's/disks' s/the/The Line 11: should not be able to create a template with disks that have an empty Line 12: aliases. Line 13: Line 14: Change-Id: If20fcbe3ae6507ba1f39c6e336928fb647efeb1e Line 8: Line 9: While making a new template based on a VM, providing the template's Line 10: allocated disks's alias as an empty string is now disabled. the user Line 11: should not be able to create a template with disks that have an empty Line 12: aliases. alias Line 13: Line 14: Change-Id: If20fcbe3ae6507ba1f39c6e336928fb647efeb1e Line 15: Bug-Url: https://bugzilla.redhat.com/1110304 http://gerrit.ovirt.org/#/c/34256/3/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 407: if(!setAndValidateCpuProfile()) { Line 408: return false; Line 409: } Line 410: Line 411: // Check that all the template's allocated disk's aliases are not an empty string. Seems like a redundant empty line to me. Line 412: for (DiskImage diskImage : diskInfoDestinationMap.values()) { Line 413: if (StringUtils.isEmpty(diskImage.getDiskAlias())) { Line 414: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_CANNOT_BE_CREATED_WITH_EMPTY_DISK_ALIAS); Line 415: } http://gerrit.ovirt.org/#/c/34256/3/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties: Line 250: ACTION_TYPE_FAILED_INSTANCE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Instance Type doesn't exist. Line 251: ACTION_TYPE_FAILED_IMAGE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Image Type doesn't exist. Line 252: ACTION_TYPE_FAILED_TEMPLATE_IS_DISABLED=Cannot ${action} ${type}. The Template is disabled, please try to enable the template first and try again. Line 253: ACTION_TYPE_FAILED_TEMPLATE_NOT_EXISTS_IN_CURRENT_DC=The specified Template doesn't exist in the current Data Center. Line 254: ACTION_TYPE_FAILED_TEMPLATE_CANNOT_BE_CREATED_WITH_EMPTY_DISK_ALIAS=Cannot ${action} ${type} with an empty disk's alias. s/disk's/disk Line 255: ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS=Cannot ${action} ${type}. One of the Template Images already exists. Line 256: ACTION_TYPE_FAILED_TEMPLATE_GUID_ALREADY_EXISTS=Cannot ${action} ${type}. A Template with the same identifier already exists. Line 257: ACTION_TYPE_FAILED_CANDIDATE_ALREADY_EXISTS=Cannot ${action} ${type}. The export candidate already exists in the specified path.\n\ Line 258: - Use the 'Force Override' option to override the existing file. http://gerrit.ovirt.org/#/c/34256/3/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java File frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java: Line 669: Line 670: @DefaultStringValue("Cannot ${action} ${type}. Only the first template version can be selected as the base template.") Line 671: String ACTION_TYPE_FAILED_TEMPLATE_VERSION_CANNOT_BE_BASE_TEMPLATE(); Line 672: Line 673: @DefaultStringValue("Cannot ${action} ${type} with an empty disk's alias.") s/disk's/disk Line 674: String ACTION_TYPE_FAILED_TEMPLATE_CANNOT_BE_CREATED_WITH_EMPTY_DISK_ALIAS(); Line 675: Line 676: @DefaultStringValue("Cannot ${action} ${type}. The relevant Instance Type doesn't exist.") Line 677: String ACTION_TYPE_FAILED_INSTANCE_TYPE_DOES_NOT_EXIST(); http://gerrit.ovirt.org/#/c/34256/3/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties File frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties: Line 230: - Check your Import Domain. Line 231: ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Template doesn't exist. Line 232: ACTION_TYPE_FAILED_CLUSTER_CAN_NOT_BE_EMPTY=Cannot ${action} ${type}. The relevant Cluster doesn't exist. Line 233: ACTION_TYPE_FAILED_TEMPLATE_VERSION_CANNOT_BE_BASE_TEMPLATE=Cannot ${action} ${type}. Only the first template version can be selected as the base template. Line 234: ACTION_TYPE_FAILED_TEMPLATE_CANNOT_BE_CREATED_WITH_EMPTY_DISK_ALIAS=Cannot ${action} ${type} with an empty disk's alias. s/disk's/disk Line 235: ACTION_TYPE_FAILED_INSTANCE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Instance Type doesn't exist. Line 236: ACTION_TYPE_FAILED_IMAGE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Image Type doesn't exist. Line 237: ACTION_TYPE_FAILED_TEMPLATE_IS_DISABLED=Cannot ${action} ${type}. The Template is disabled, please try to enable the template first and try again. Line 238: ACTION_TYPE_FAILED_TEMPLATE_NOT_EXISTS_IN_CURRENT_DC=The specified Template doesn't exist in the current Data Center. http://gerrit.ovirt.org/#/c/34256/3/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties File frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties: Line 243: - Check your Import Domain. Line 244: ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Template doesn't exist. Line 245: ACTION_TYPE_FAILED_CLUSTER_CAN_NOT_BE_EMPTY=Cannot ${action} ${type}. The relevant Cluster doesn't exist. Line 246: ACTION_TYPE_FAILED_TEMPLATE_VERSION_CANNOT_BE_BASE_TEMPLATE=Cannot ${action} ${type}. Only the first template version can be selected as the base template. Line 247: ACTION_TYPE_FAILED_TEMPLATE_CANNOT_BE_CREATED_WITH_EMPTY_DISK_ALIAS=Cannot ${action} ${type} with an empty disk's alias. s/disk's/disk Line 248: ACTION_TYPE_FAILED_INSTANCE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Instance Type doesn't exist. Line 249: ACTION_TYPE_FAILED_IMAGE_TYPE_DOES_NOT_EXIST=Cannot ${action} ${type}. The relevant Image Type doesn't exist. Line 250: ACTION_TYPE_FAILED_TEMPLATE_IS_DISABLED=Cannot ${action} ${type}. The Template is disabled, please try to enable the template first and try again. Line 251: ACTION_TYPE_FAILED_TEMPLATE_NOT_EXISTS_IN_CURRENT_DC=The specified Template doesn't exist in the current Data Center. -- To view, visit http://gerrit.ovirt.org/34256 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If20fcbe3ae6507ba1f39c6e336928fb647efeb1e Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Idan Shaby <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Vered Volansky <[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
