Federico Simoncelli has posted comments on this change. Change subject: core: set current user in import glance image as template ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/26601/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCopyTaskHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCopyTaskHandler.java: Line 120: String vmTemplateName = "GlanceTemplate-" + Guid.newGuid().toString().substring(0, 7); Line 121: AddVmTemplateParameters parameters = new AddVmTemplateParameters(masterVm, vmTemplateName, templateDiskImage.getDiskDescription()); Line 122: Line 123: // Setting the user from the parent command, as the session might already be invalid Line 124: parameters.setParametersCurrentUser(getEnclosingCommand().getParameters().getParametersCurrentUser()); > It is set on the parameters class of this specific AddVmTemplateCommand. In CommandBase I saw: // if the user is not logged in, get the user from the command parameters // this is used for async task completion to get the user who initiated // the task after the user has logged out. if (parameters.getParametersCurrentUser() != null) { setCurrentUser(parameters.getParametersCurrentUser()); } so I thought that this was automatic for all the commands. Line 125: Line 126: // Setting the cluster ID, and other related properties derived from it Line 127: if (getEnclosingCommand().getParameters().getClusterId() != null) { Line 128: masterVm.setVdsGroupId(getEnclosingCommand().getParameters().getClusterId()); -- To view, visit http://gerrit.ovirt.org/26601 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69dd535db983471ba31b8d427b4e0a373f1f7dc4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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