Lior Vernia has posted comments on this change.

Change subject: webadmin: edit vfsConfig- persist vfs config changes
......................................................................


Patch Set 32:

(6 comments)

https://gerrit.ovirt.org/#/c/36421/32/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostNicModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostNicModel.java:

Correct me if I'm wrong, but it seems no changes in this file are needed if you 
don't change the code in the presenter.
Line 1: package org.ovirt.engine.ui.uicommonweb.models.hosts;
Line 2: 
Line 3: import java.util.Collection;
Line 4: import java.util.Collections;


https://gerrit.ovirt.org/#/c/36421/32/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java:

Line 299:         NetworkOperation.clearNetworks(ifaceModel, allNics);
Line 300:         NetworkOperation.attachNetworks(ifaceModel, new 
ArrayList<LogicalNetworkModel>(potentialNetworks), allNics);
Line 301:     }
Line 302: 
Line 303:     private void commitVfsConfigChanges(final HostNicVfsConfig 
hostNicVfsConfig,
See comment in HostNicModel.java - I think every change that's unrelated to 
this specific method isn't needed.
Line 304:             final VfsConfigModel vfsConfigModel) {
Line 305:         if (hostNicVfsConfig != null) {
Line 306:             
hostNicVfsConfig.setNumOfVfs(vfsConfigModel.getNumOfVfs().getEntity());
Line 307: 


https://gerrit.ovirt.org/#/c/36421/32/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java:

Line 28:     public Collection<String> getSuggestedLabels() {
Line 29:         return suggestedLabels;
Line 30:     }
Line 31: 
Line 32:     public NicLabelModel() {
Same comment as in HostNicModel.java, don't think this is needed.
Line 33:         this(Collections.<VdsNetworkInterface> emptyList(),
Line 34:                 Collections.<String> emptyList(),
Line 35:                 Collections.<String, String> emptyMap());
Line 36:     }


https://gerrit.ovirt.org/#/c/36421/32/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/host/HostNicPopupPresenterWidget.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/popup/host/HostNicPopupPresenterWidget.java:

Line 23: 
Line 24:     @Override
Line 25:     public void init(HostNicModel model) {
Line 26:         if (model.getVfsConfigModel() != 
HostNicModel.EMPTY_VFS_CONFIG_MODEL) {
Line 27:             if (model.getLabelsModel() != 
HostNicModel.EMPTY_LABELS_MODEL) {
Why is this change good? The previous code is much clearer (well, it would be 
if you were using !model.getInterface().isBondSlave() as I had suggested on a 
previous patch...).
Line 28:                 // sriov nic
Line 29:                 getView().showTabs();
Line 30: 
Line 31:             } else {


Line 26:         if (model.getVfsConfigModel() != 
HostNicModel.EMPTY_VFS_CONFIG_MODEL) {
Line 27:             if (model.getLabelsModel() != 
HostNicModel.EMPTY_LABELS_MODEL) {
Line 28:                 // sriov nic
Line 29:                 getView().showTabs();
Line 30: 
?
Line 31:             } else {
Line 32:                 // sriov bond slave
Line 33:                 getView().showOnlyVfsConfig();
Line 34:             }


https://gerrit.ovirt.org/#/c/36421/32/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostNicPopupView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostNicPopupView.java:

Line 75:     }
Line 76: 
Line 77:     @Override
Line 78:     public HostNicModel flush() {
Line 79:         HostNicModel hostNicModel = driver.flush();
Why these changes?...
Line 80:         labelsWidget.flush();
Line 81:         vfsConfigWidget.flush();
Line 82:         return hostNicModel;
Line 83:     }


-- 
To view, visit https://gerrit.ovirt.org/36421
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa221586d123a3bc4925b077921391508a4680ec
Gerrit-PatchSet: 32
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@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

Reply via email to