Omer Frenkel has posted comments on this change.

Change subject: core: Hot set number of CPUs using update VM
......................................................................


Patch Set 8:

(4 comments)

http://gerrit.ovirt.org/#/c/22757/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNumberOfCpusCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNumberOfCpusCommand.java:

Line 25:     }
Line 26: 
Line 27:     @Override
Line 28:     protected boolean canDoAction() {
Line 29:         if (getVm().getStatus() != VMStatus.Up) {
please verify vm is not null somehow
Line 30:             failCanDoAction(VdcBllMessages.VAR__VM_STATUS__UP);
Line 31:         }
Line 32:         if (getVm().getNumOfCpus() >
Line 33:                 getVds().getCpuCores() * getVds().getCpuSockets() * 
getVds().getCpuThreads()) {


Line 26: 
Line 27:     @Override
Line 28:     protected boolean canDoAction() {
Line 29:         if (getVm().getStatus() != VMStatus.Up) {
Line 30:             failCanDoAction(VdcBllMessages.VAR__VM_STATUS__UP);
replace message
Line 31:         }
Line 32:         if (getVm().getNumOfCpus() >
Line 33:                 getVds().getCpuCores() * getVds().getCpuSockets() * 
getVds().getCpuThreads()) {
Line 34:             
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CPUS);


Line 28:     protected boolean canDoAction() {
Line 29:         if (getVm().getStatus() != VMStatus.Up) {
Line 30:             failCanDoAction(VdcBllMessages.VAR__VM_STATUS__UP);
Line 31:         }
Line 32:         if (getVm().getNumOfCpus() >
should be using vm from params
Line 33:                 getVds().getCpuCores() * getVds().getCpuSockets() * 
getVds().getCpuThreads()) {
Line 34:             
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CPUS);
Line 35:         }
Line 36:         if 
(!FeatureSupported.hotPlugCpu(getVm().getVdsGroupCompatibilityVersion(), 
getVm().getClusterArch())) {


Line 29:         if (getVm().getStatus() != VMStatus.Up) {
Line 30:             failCanDoAction(VdcBllMessages.VAR__VM_STATUS__UP);
Line 31:         }
Line 32:         if (getVm().getNumOfCpus() >
Line 33:                 getVds().getCpuCores() * getVds().getCpuSockets() * 
getVds().getCpuThreads()) {
check if there is some sla logic you can reuse here
Line 34:             
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CPUS);
Line 35:         }
Line 36:         if 
(!FeatureSupported.hotPlugCpu(getVm().getVdsGroupCompatibilityVersion(), 
getVm().getClusterArch())) {
Line 37:             failCanDoAction(VdcBllMessages.HOT_PLUG_IS_NOT_SUPPORTED);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I464a3dda5f143d1fcef63fd903eb615b01efe081
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[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

Reply via email to