Oved Ourfali 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());
> Minor: is it dangerous to set this regardless? (also when we're not importi
It is set on the parameters class of this specific AddVmTemplateCommand.
I've already set that in the parent command (look at the constructor, 
containing the line:
getParameters().setParametersCurrentUser(getCurrentUser());
).
So, if we call other commands we will have to remember to do that.
Can't do it generically for all the commands that are used in this task handler.
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

Reply via email to