Alona Kaplan has posted comments on this change.

Change subject: restapi: Add support for Network Attachements.
......................................................................


Patch Set 44:

(4 comments)

https://gerrit.ovirt.org/#/c/32775/44//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2014-09-10 10:23:33 +0300
Line 4: Commit:     Martin Mucha <mmu...@redhat.com>
Line 5: CommitDate: 2015-06-13 18:57:00 +0200
Line 6: 
Line 7: restapi: Add support for Network Attachements.
You didn't refer to the comment on patchset 38-
"This patch contains also non restapi code. Please create a new patch with all 
the non restapi related classes."
Line 8: 
Line 9: A network attachment represents the network as it
Line 10: designed to be configured on the host and allow the
Line 11: user to use it for managing network on hosts.


https://gerrit.ovirt.org/#/c/32775/44/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentValidator.java:

Line 100:         return 
ValidationResult.failWith(VdcBllMessages.NETWORK_ADDR_MANDATORY_IN_STATIC_IP)
Line 101:             .unless(ipConfiguration == null
Line 102:                 || ipConfiguration.getBootProtocol() != 
NetworkBootProtocol.STATIC_IP
Line 103:                 || (ipConfiguration.hasPrimaryAddressSet()
Line 104:                 && ipConfiguration.getPrimaryAddress().getAddress() 
!= null
Should you check 
StringUtils.isNotEmpty(ipConfiguration.getPrimaryAddress().getAddress()) ?
Same as you do for the gateway in line 151
Line 105:                 && ipConfiguration.getPrimaryAddress().getNetmask() 
!= null));
Line 106:     }
Line 107: 
Line 108:     public ValidationResult bootProtocolSetForDisplayNetwork() {


Line 101:             .unless(ipConfiguration == null
Line 102:                 || ipConfiguration.getBootProtocol() != 
NetworkBootProtocol.STATIC_IP
Line 103:                 || (ipConfiguration.hasPrimaryAddressSet()
Line 104:                 && ipConfiguration.getPrimaryAddress().getAddress() 
!= null
Line 105:                 && ipConfiguration.getPrimaryAddress().getNetmask() 
!= null));
same
Line 106:     }
Line 107: 
Line 108:     public ValidationResult bootProtocolSetForDisplayNetwork() {
Line 109:         IpConfiguration ipConfiguration = 
attachment.getIpConfiguration();


https://gerrit.ovirt.org/#/c/32775/44/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/IpConfiguration.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/IpConfiguration.java:

Line 22:             max = 1,
Line 23:             groups = { CreateEntity.class, UpdateEntity.class },
Line 24:             message = "Currently is supported only one IPv4 address 
for NIC."
Line 25:     )
Line 26:     private List<IPv4Address> IPv4Addresses = new ArrayList<>();
A variable shouldn't start with a capital letter.
Line 27: 
Line 28:     public static long getSerialVersionUID() {
Line 29:         return serialVersionUID;
Line 30:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id6ac91eea1000f7fdf6105777343a1ac1c77368d
Gerrit-PatchSet: 44
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: Juan Hernandez <juan.hernan...@redhat.com>
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