Kanagaraj M has uploaded a new change for review. Change subject: webadmin: Fix import gluster hosts to invalid cluster ......................................................................
webadmin: Fix import gluster hosts to invalid cluster When user provides duplicate cluster name and tries to import existing gluster configuration, there were no checks whether the cluster creation is successful or not. This is now fixed, add host will be attempted only if the cluster creation is successful. Change-Id: I289b56d1f800cd0e74b1a4f0b15df22f63895648 Bug-Url: https://bugzilla.redhat.com/880043 Signed-off-by: Kanagaraj M <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/89/9789/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java index cd1e02d..f80c0ef 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterListModel.java @@ -674,8 +674,11 @@ public void postOnSaveInternalWithImport(VdcReturnValueBase returnValue) { MultipleHostsModel hostsModel = (MultipleHostsModel) getWindow(); - hostsModel.getClusterModel().setClusterId((Guid) returnValue.getActionReturnValue()); - addHosts(hostsModel); + if (returnValue != null && returnValue.getSucceeded()) + { + hostsModel.getClusterModel().setClusterId((Guid) returnValue.getActionReturnValue()); + addHosts(hostsModel); + } } private void addHosts(final MultipleHostsModel hostsModel) { -- To view, visit http://gerrit.ovirt.org/9789 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I289b56d1f800cd0e74b1a4f0b15df22f63895648 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Kanagaraj M <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
