
Alona Kaplan has submitted this change and it was merged. Change subject: webadmin: Rewrote Setup Networks operation logic ...................................................................... webadmin: Rewrote Setup Networks operation logic To extend the dragging capabilities in the Setup Networks dialog, the following was done: * Two new operations were introduced, JOIN_BONDS and EXTEND_BOND_WITH. Other null operations were added to better explain to the user what it is that went wrong. * Completely rewrote the operationFor() method of NetworkOperationFactory. The main flow is now validation-oriented rather than operand-type-oriented, which enables to reuse the validation logic which is common to most operations (regardless of the operand type). Operand types are only checked secondarily, to know which specific operation to return once a network configuration is rendered valid/invalid. * In order to better advise the user how to fix invalid network configurations when joining two NICs, the name of the network at fault is now saved in the NetworkInterfaceModel during the validity check, and later extracted using the getMessage() method of NetworkOperation. It's ugly but it works. * Beautification: Standardized operation naming, error message naming, spacing in NetworkOperation enum. * Changed some logic in HostSetupNetworksModel, specifically to enable reattaching all networks (of all NICs taking part in the bond operation) to a newly-created bond and to take special care of the new bond join operation. * Changed some code in bond views to adjoin custom bond definition to the text in the list box, so that a user may differentiate between different custom bond options (if they exist). Change-Id: Iea5793221d295fa0bd73fc1ed988c90df8fee7c8 Bug-Url: https://bugzilla.redhat.com/825801 Signed-off-by: Lior Vernia <lvernia@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java A frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/SetupNetworksJoinBondsModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/BondNetworkInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/NetworkInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/NetworkOperation.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/NetworkOperationFactory.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Messages.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostBondPopupView.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostInterfacePopupView.java M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostManagementPopupView.java 11 files changed, 380 insertions(+), 207 deletions(-) Approvals: Alona Kaplan: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/13775 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea5793221d295fa0bd73fc1ed988c90df8fee7c8 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <lvernia@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkaplan@redhat.com> Gerrit-Reviewer: Lior Vernia <lvernia@redhat.com>