Roy Golan has posted comments on this change.

Change subject: core: adjustments needed to support instance types
......................................................................


Patch Set 16:

(6 comments)

http://gerrit.ovirt.org/#/c/23828/16/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractVmWatchdogCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractVmWatchdogCommand.java:

Line 90:     }
Line 91: 
Line 92:     protected ValidationResult validateModelCompatibleWithOs() {
Line 93:         VmWatchdogValidator validator = getVmWatchdogValidator();
Line 94:         if (validator != null) {
much more readable and simple to add at line 58 a simple check
instead of null check on the validator


  if (!entityExist) {
  ...
  } else if (!getParameters().isVm() && getTemplate().getVdsGroupId() == null {
   return 
failCanDo(ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_CAN_NOT_BE_EMPTY
Line 95:             return validator.isModelCompatibleWithOs();
Line 96:         } else {
Line 97:             return new 
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_CAN_NOT_BE_EMPTY);
Line 98:         }


http://gerrit.ovirt.org/#/c/23828/16/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 340: addCanDoActionMessage
a nift - can you change here to return failCanDoAction...


Line 346:             return false;
Line 347:         }
Line 348: 
Line 349:         if (isVmInDb && getVm().getStatus() != VMStatus.Down) {
Line 350:             
addCanDoActionMessage(VdcBllMessages.VMT_CANNOT_CREATE_TEMPLATE_FROM_DOWN_VM.toString());
and here
Line 351:             return false;
Line 352:         }
Line 353: 
Line 354:         if (isVmTemlateWithSameNameExist(getVmTemplateName())) {


Line 352:         }
Line 353: 
Line 354:         if (isVmTemlateWithSameNameExist(getVmTemplateName())) {
Line 355:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED);
Line 356:             return false;
and here
Line 357:         }
Line 358: 
Line 359:         if (getParameters().getBaseTemplateId() != null) {
Line 360:             VmTemplate userSelectedBaseTemplate = 
getVmTemplateDAO().get(getParameters().getBaseTemplateId());


Line 370: isInstanceType
;-) instance types got your happiness and positiveness out.. 

 if (isInstanceType) {
    return true;
 } else clusterCheck..


http://gerrit.ovirt.org/#/c/23828/16/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmTemplateImageTemplatesCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmTemplateImageTemplatesCommand.java:

Line 99: getVdsGroup
don't think cluster is ever being used in that command.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifaebd849061efa1637f9fa21d8584212ba0e51f2
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@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