Tomer Saban has uploaded a new change for review. Change subject: webadmin: Fixed VM moving between clusters error. ......................................................................
webadmin: Fixed VM moving between clusters error. When moving vm between clusters(Hosts from different clusters), an error message would appear saying: ACTION_TYPE_CPU_PROFILE_NOT_MATCH_CLUSTER But, after closing the message the vm would move to the other cluster as meant. This bug was fixed and now no error message appears. Change-Id: I5ebc94110b94be74b081d92da3e40a1f5bf9239e Bug-Url: https://bugzilla.redhat.com/1142629 Signed-off-by: Tomer Saban <tsa...@redhat.com> --- M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 4 files changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/95/34395/1 diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties index fb5ab1b..c82f1ad 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -1163,6 +1163,7 @@ ACTION_TYPE_FAILED_DISK_PROFILE_NOT_FOUND=Cannot ${action} ${type}. Disk Profile wasn't found. ACTION_TYPE_DISK_PROFILE_STORAGE_DOMAIN_NOT_PROVIDED=Cannot ${action} ${type}. Storage Domain wasn't provided. ACTION_TYPE_DISK_PROFILE_NOT_MATCH_STORAGE_DOMAIN=Cannot ${action} ${type}. Disk Profile doesn't match provided Storage Domain. +ACTION_TYPE_CPU_PROFILE_NOT_MATCH_CLUSTER=Cannot ${action} ${type}. Disk Profile doesn't match provided Cluster. ACTION_TYPE_CANNOT_REMOVE_LAST_CPU_PROFILE_IN_CLUSTER=Cannot ${action} ${type}. Cannot remove last CPU profile in Cluster. ACTION_TYPE_CANNOT_REMOVE_LAST_DISK_PROFILE_IN_STORAGE_DOMAIN=Cannot ${action} ${type}. Cannot remove last Disk profile in Storage Domain. diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java index f9a5a87..0e123e3 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java @@ -3140,6 +3140,9 @@ @DefaultStringValue("Cannot ${action} ${type}. Disk Profile doesn't match provided Storage Domain.") String ACTION_TYPE_DISK_PROFILE_NOT_MATCH_STORAGE_DOMAIN(); + @DefaultStringValue("Cannot ${action} ${type}. Disk Profile doesn't match provided Cluster.") + String ACTION_TYPE_CPU_PROFILE_NOT_MATCH_CLUSTER(); + @DefaultStringValue("Cannot ${action} ${type}. Cannot remove last CPU profile in Cluster.") String ACTION_TYPE_CANNOT_REMOVE_LAST_CPU_PROFILE_IN_CLUSTER(); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java index 693ad48..7f1a349 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java @@ -193,7 +193,7 @@ }), vm.getRunOnVds()); } - updateCpuProfile(vm.getVdsGroupId(), vm.getVdsGroupCompatibilityVersion(), vm.getCpuProfileId()); + } @Override @@ -203,6 +203,18 @@ new CommentVmBaseToUnitBuilder(), new CommonVmBaseToUnitBuilder()); } + + @Override + public void dataCenterWithClusterSelectedItemChanged() + { + super.dataCenterWithClusterSelectedItemChanged(); + if (getModel().getSelectedCluster() != null) + { + updateCpuProfile(getModel().getSelectedCluster().getId(), + getClusterCompatibilityVersion(), + vm.getCpuProfileId()); + } + } private int calculateHostCpus() { return getModel().getSelectedCluster().getCountThreadsAsCores() ? runningOnHost.getCpuThreads() : runningOnHost.getCpuCores(); diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index be087ee..b7c1699 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -1132,6 +1132,7 @@ ACTION_TYPE_FAILED_DISK_PROFILE_NOT_FOUND=Cannot ${action} ${type}. Disk Profile wasn't found. ACTION_TYPE_DISK_PROFILE_STORAGE_DOMAIN_NOT_PROVIDED=Cannot ${action} ${type}. Storage Domain wasn't provided. ACTION_TYPE_DISK_PROFILE_NOT_MATCH_STORAGE_DOMAIN=Cannot ${action} ${type}. Disk Profile doesn't match provided Storage Domain. +ACTION_TYPE_DISK_PROFILE_NOT_MATCH_CLUSTER=Cannot ${action} ${type}. Disk Profile doesn't match provided Cluster. ACTION_TYPE_CANNOT_REMOVE_LAST_CPU_PROFILE_IN_CLUSTER=Cannot ${action} ${type}. Cannot remove last CPU profile in Cluster. ACTION_TYPE_CANNOT_REMOVE_LAST_DISK_PROFILE_IN_STORAGE_DOMAIN=Cannot ${action} ${type}. Cannot remove last Disk profile in Storage Domain. -- To view, visit http://gerrit.ovirt.org/34395 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ebc94110b94be74b081d92da3e40a1f5bf9239e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomer Saban <tsa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches