Alona Kaplan has posted comments on this change.

Change subject: engine: Re-define HostSetupNetworks based on network attachments
......................................................................


Patch Set 32:

(2 comments)

https://gerrit.ovirt.org/#/c/32910/32/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/HostNetwork.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/HostNetwork.java:

Line 82:         return hasIpConfiguration() ? 
getIpConfiguration().getBootProtocol() : null;
Line 83:     }
Line 84: 
Line 85:     public String getAddress() {
Line 86:         if (!hasIpConfiguration() || 
!getIpConfiguration().hasPrimaryAddressSet()) {
The order of the patches is wrong. You introduce IpConfiguration.primaryAddress 
just in a later patch-
Line 87:             return null;
Line 88:         }
Line 89: 
Line 90:         return getIpConfiguration().getPrimaryAddress().getAddress();


Line 98:         return getIpConfiguration().getPrimaryAddress().getNetmask();
Line 99:     }
Line 100: 
Line 101:     public String getGateway() {
Line 102:         if (!hasIpConfiguration() || 
!getIpConfiguration().hasPrimaryAddressSet()) {
You repeat this 'if' in three places. Please extract it to a method.
Line 103:             return null;
Line 104:         }
Line 105: 
Line 106:         return getIpConfiguration().getPrimaryAddress().getGateway();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I75d02e4be71f00510bc8815c555a94d7efc9252e
Gerrit-PatchSet: 32
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to