Omer Frenkel has posted comments on this change.

Change subject: core, webadmin: remove name from template version
......................................................................


Patch Set 7:

(4 comments)

http://gerrit.ovirt.org/#/c/26270/7/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 369: 
Line 370:             }
Line 371:             // template version name should be the same as the base 
template name
Line 372:             else {
Line 373:                 setVmTemplateName(userSelectedBaseTemplate.getName());
> I think it is better that this setting won't be in the canDoAction method f
Done, but anyway end-action use the template from db so no issue there
Line 374:             }
Line 375:         }
Line 376: 
Line 377:         return imagesRelatedChecks() && 
AddVmCommand.checkCpuSockets(getParameters().getMasterVm().getNumOfSockets(),


http://gerrit.ovirt.org/#/c/26270/7/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties:

Line 139: VMT_CANNOT_REMOVE_BLANK_TEMPLATE=Cannot ${action} ${type}. Removing 
Blank Template is not allowed.
Line 140: VMT_CANNOT_EDIT_BLANK_TEMPLATE=Cannot ${action} ${type}. Editing 
Blank Template is not allowed.
Line 141: VMT_CANNOT_EXPORT_BLANK_TEMPLATE=Cannot export Blank Template.
Line 142: VMT_CANNOT_UPDATE_ILLEGAL_FIELD=Failed updating the properties of the 
VM template.
Line 143: VMT_CANNOT_UPDATE_VERSION_NAME=Cannot update the name of Template 
Version, Only the Version name can be updated.
> 1. I understand why you wrote it as you did, but I'm not sure it is easy to
1. but it is referred as template version in all other messages, sub-template 
is not used anywhere
2. done
Line 144: DIRECTORY_GROUP_CANNOT_REMOVE_DIRECTORY_GROUP_ATTACHED_TO_VM=Cannot 
remove Directory Group. Detach Directory Group from VM first.
Line 145: VM_NOT_FOUND=VM not found
Line 146: ACTION_TYPE_FAILED_CLUSTER_UNDEFINED_ARCHITECTURE=Cannot ${action} 
${type}. The cluster does not have a defined architecture.
Line 147: ACTION_TYPE_FAILED_MISSED_STORAGES_FOR_SOME_DISKS=Cannot ${action} 
${type}. One or more provided storage domains are in 
maintenance/non-operational status.


http://gerrit.ovirt.org/#/c/26270/7/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateVmModelBehavior.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateVmModelBehavior.java:

Line 466:         if (!getModel().getIsSubTemplate().getEntity()) {
Line 467:             getModel().getName().setEntity(""); //$NON-NLS-1$
Line 468:         } else {
Line 469:             // by default select the template of the vm
Line 470:             
getModel().getBaseTemplate().setEntity(getModel().getTemplate().getEntity());
> don't you need to make the version name unchangeable here as well/clear its
why? here we in template version flow the version name is always changeable, we 
hide and show it according to the checkbox
Line 471: 
Line 472:             // copy any entered name to be the template-version name
Line 473:             
getModel().getTemplateVersionName().setEntity(getModel().getName().getEntity());
Line 474:             
getModel().getName().setEntity(getModel().getBaseTemplate().getSelectedItem().getName());


http://gerrit.ovirt.org/#/c/26270/7/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java:

Line 187:             
getModel().getTemplate().setSelectedItem(subVersions.get(1));
Line 188:         }
Line 189:     }
Line 190: 
Line 191:     protected void isSubTemplateEntityChanged() {
> 1. can it be abstract method?
1. it will cause implementing a blank method (as it is here exactly) in 4 
inheriting classes, i think there is no point in making this abstract.

2. i dont mind changing, but you should read it as: "the isSubTemplateEntity 
has changed" and not "is SubTemplateEntity has changed" because the entity is a 
checkbox...
Line 192:     }
Line 193: 
Line 194:     public boolean validate()
Line 195:     {


-- 
To view, visit http://gerrit.ovirt.org/26270
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I27f26e7d196d1d2eebfe86e8aac886f3e6a8fc5e
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@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