Daniel Erez has posted comments on this change. Change subject: ui: adding discover host integration to AddHost view ......................................................................
Patch Set 9: (14 comments) http://gerrit.ovirt.org/#/c/27623/9/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties File backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties: Line 234: VDS_RECOVER=Host ${VdsName} is rebooting. Line 235: VDS_RECOVER_FAILED=Host ${VdsName} failed to recover. Line 236: VDS_RECOVER_FAILED_VMS_UNKNOWN=Host ${VdsName} cannot be reached, VMs state on this host are marked as Unknown. Line 237: VDS_NO_SELINUX_ENFORCEMENT=Host ${VdsName} does not enforce SELinux. Line 238: VDS_PROVISION=Installing OS on Host ${VdsName} using Hostgroup ${HostGroupName}. move to 'core' patch Line 239: VM_DOWN=VM ${VmName} is down. ${ExitMessage} Line 240: USER_SUSPEND_VM_OK=VM ${VmName} on Host ${VdsName} is suspended. Line 241: VM_FAILURE=VM ${VmName} cannot be found on Host ${VdsName}. Line 242: VM_MIGRATION_ABORT=Migration failed: ${MigrationError} (VM: ${VmName}, Source: ${VdsName}, Destination: ${DestinationVdsName}). http://gerrit.ovirt.org/#/c/27623/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java: Line 3010: @Override Line 3011: public Object Convert(Object source, AsyncQuery _asyncQuery) Line 3012: { Line 3013: if (source == null) Line 3014: { formatter Line 3015: return new ArrayList<ExternalDiscoveredHost>(); Line 3016: } Line 3017: return source; Line 3018: } Line 3027: @Override Line 3028: public Object Convert(Object source, AsyncQuery _asyncQuery) Line 3029: { Line 3030: if (source == null) Line 3031: { formatter Line 3032: return new ArrayList<ExternalHostGroup>(); Line 3033: } Line 3034: return source; Line 3035: } Line 3045: @Override Line 3046: public Object Convert(Object source, AsyncQuery _asyncQuery) Line 3047: { Line 3048: if (source == null) Line 3049: { formatter Line 3050: return new ArrayList<ExternalComputeResource>(); Line 3051: } Line 3052: return source; Line 3053: } http://gerrit.ovirt.org/#/c/27623/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/EditHostModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/EditHostModel.java: Line 54: getCluster().setIsChangable(false); Line 55: } Line 56: Line 57: @Override Line 58: public void updateHosts() { needed? (is it called from outside) Line 59: } Line 60: Line 61: @Override Line 62: public boolean showExternalProviderPanel() { http://gerrit.ovirt.org/#/c/27623/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java: Line 976: parameters.setAddProvisioned( Line 977: provider.getId(), Line 978: hostGroup, Line 979: computeResource.getId(), Line 980: ((ExternalDiscoveredHost)model.getExternalDiscoveredHosts().getSelectedItem()).getMac(), extract to discoveredHost variable (similar to 'computeResource'..) Line 981: ((ExternalDiscoveredHost)model.getExternalDiscoveredHosts().getSelectedItem()).getName()); Line 982: } Line 983: Line 984: Frontend.getInstance().runAction(VdcActionType.AddVds, parameters, http://gerrit.ovirt.org/#/c/27623/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java: Line 61: if (host == null) { Line 62: host = new VDS(); Line 63: } Line 64: updateModelFromVds(host, null, false, null); Line 65: getHost().setEntity(host.getName()); won't getName() return null in case of 'host == null' ? Line 66: getHost().setIsChangable(false); Line 67: } Line 68: Line 69: private void discoverHostName_SelectedItemChanged() { Line 106: public void onSuccess(Object model, Object result) Line 107: { Line 108: ArrayList<ExternalDiscoveredHost> hosts = (ArrayList<ExternalDiscoveredHost>) result; Line 109: ListModel externalDiscoveredHostsListModel = getExternalDiscoveredHosts(); Line 110: hosts.add(0, null); shouldn't the first host be selected automatically? Line 111: externalDiscoveredHostsListModel.setItems(hosts); Line 112: externalDiscoveredHostsListModel.setIsChangable(true); Line 113: } Line 114: }; Line 189: } Line 190: Line 191: @Override Line 192: public void updateHosts() { Line 193: UpdateExternalHostModels(); lower-case 'u' Line 194: updateHostList(getProviderSearchFilter().getEntity()); Line 195: } Line 196: Line 197: @Override http://gerrit.ovirt.org/#/c/27623/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java: Line 137: return type == ProviderType.OPENSTACK_NETWORK || type == ProviderType.OPENSTACK_IMAGE; Line 138: } Line 139: Line 140: private boolean isTypeRequiresAuthentication() { Line 141: return false; shouldn't we still support authentication? Line 142: } Line 143: Line 144: private String getDefaultUrl(ProviderType type) { Line 145: if (type == null) { http://gerrit.ovirt.org/#/c/27623/9/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java: Line 2792: Line 2793: @DefaultStringValue("List Of Installed Hosts To Add From Provider") Line 2794: String provisionedHostInfo(); Line 2795: Line 2796: @DefaultStringValue("List Of Clear Servers For OS Provisioning From Provider. After OS Provision The Host Will Be Automatically Added To The Picked Cluster") too much words begin with an upper-case letter :) Line 2797: String discoveredHostInfoIcon(); Line 2798: Line 2799: @DefaultStringValue("Changes done to the Networking configuration are temporary until explicitly saved.") Line 2800: String commitChangesInfoPart1(); http://gerrit.ovirt.org/#/c/27623/9/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java: Line 412: @UiField(provided=true) Line 413: @Ignore Line 414: InfoIcon consoleAddressInfoIcon; Line 415: Line 416: @UiField(provided=true) formatter ('missing whitespaces) Line 417: @Ignore Line 418: InfoIcon discoveredHostInfoIcon; Line 419: Line 420: @UiField(provided=true) Line 416: @UiField(provided=true) Line 417: @Ignore Line 418: InfoIcon discoveredHostInfoIcon; Line 419: Line 420: @UiField(provided=true) same Line 421: @Ignore Line 422: InfoIcon provisionedHostInfoIcon; Line 423: Line 424: @UiField Line 940: Line 941: private void usualFormToDiscover(boolean isDiscovered) { Line 942: if (isDiscovered) { Line 943: authLabel.setText(constants.hostPopupAuthLabelForExternalHost()); Line 944: rbPublicKey.setVisible(false); consider using the 'isDiscovered' boolean for all editors Line 945: rbPassword.setVisible(false); Line 946: expanderContent.setVisible(false); Line 947: publicKeyEditor.setVisible(false); Line 948: authSshPortEditor.setVisible(false); -- To view, visit http://gerrit.ovirt.org/27623 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0faf667019760326019368f044ee16265d41a620 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@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