Gilad Chaplik has uploaded a new change for review. Change subject: core: ignore cpu profile for instance type ......................................................................
core: ignore cpu profile for instance type Since both template and instance type use same commands, CPU profile should be checked only for template. Change-Id: I5d2b043fbcfacd59d61cb26e28078df38554dc9f Bug-Url: https://bugzilla.redhat.com/1084930 Signed-off-by: Gilad Chaplik <[email protected]> (cherry picked from commit c9436ab000dbde8cbcc55d6d7582c2b651184149) --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/31969/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java index 64b56cd..2152032 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java @@ -863,6 +863,10 @@ } protected boolean setAndValidateCpuProfile() { + // cpu profile isn't supported for instance types. + if (getParameters().getTemplateType() == VmEntityType.INSTANCE_TYPE) { + return true; + } return validate(CpuProfileHelper.setAndValidateCpuProfile(getParameters().getMasterVm(), getVdsGroup().getcompatibility_version())); } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java index 05bea78..40ece2e 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java @@ -324,6 +324,10 @@ } protected boolean setAndValidateCpuProfile() { + // cpu profile isn't supported for instance types. + if (getVmTemplate().getTemplateType() == VmEntityType.INSTANCE_TYPE) { + return true; + } return validate(CpuProfileHelper.setAndValidateCpuProfile(getVmTemplate(), getVdsGroup().getcompatibility_version())); } -- To view, visit http://gerrit.ovirt.org/31969 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d2b043fbcfacd59d61cb26e28078df38554dc9f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Gilad Chaplik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
