rafaelweingartner commented on a change in pull request #2773:
CLOUDSTACK-10328: Add Secondary IPv6 address through API
URL: https://github.com/apache/cloudstack/pull/2773#discussion_r206869423
##########
File path: server/src/main/java/com/cloud/api/ApiResponseHelper.java
##########
@@ -3623,7 +3623,11 @@ public NicSecondaryIpResponse
createSecondaryIPToNicResponse(NicSecondaryIp resu
NicVO nic = _entityMgr.findById(NicVO.class, result.getNicId());
NetworkVO network = _entityMgr.findById(NetworkVO.class,
result.getNetworkId());
response.setId(result.getUuid());
- response.setIpAddr(result.getIp4Address());
+ if (result.getIp4Address() != null) {
Review comment:
would you mind extracting the block 3626-3630 to a method? You can then unit
test it.
Moreover, it looks like this block is also used at 3713-3717
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services