Github user sudhansu7 commented on the issue: https://github.com/apache/cloudstack/pull/1797 @pdion891 The first listNic example is incorrect code. Which has been fixed in this PR. You can use listVirtualMachine command to see the nic response. As per code there is no restriction on broadcasturi. If broadcasturi is not null then it will part of vm response. So the ListNic should also behave the same way. ''' if (details.contains(VMDetails.all) || details.contains(VMDetails.nics)) { long nic_id = userVm.getNicId(); if (nic_id > 0) { NicResponse nicResponse = new NicResponse(); nicResponse.setId(userVm.getNicUuid()); nicResponse.setIpaddress(userVm.getIpAddress()); nicResponse.setGateway(userVm.getGateway()); nicResponse.setNetmask(userVm.getNetmask()); nicResponse.setNetworkid(userVm.getNetworkUuid()); nicResponse.setNetworkName(userVm.getNetworkName()); nicResponse.setMacAddress(userVm.getMacAddress()); nicResponse.setIp6Address(userVm.getIp6Address()); nicResponse.setIp6Gateway(userVm.getIp6Gateway()); nicResponse.setIp6Cidr(userVm.getIp6Cidr()); if (userVm.getBroadcastUri() != null) { nicResponse.setBroadcastUri(userVm.getBroadcastUri().toString()); } if (userVm.getIsolationUri() != null) { nicResponse.setIsolationUri(userVm.getIsolationUri().toString()); } if (userVm.getTrafficType() != null) { nicResponse.setTrafficType(userVm.getTrafficType().toString()); } if (userVm.getGuestType() != null) { nicResponse.setType(userVm.getGuestType().toString()); } nicResponse.setIsDefault(userVm.isDefaultNic()); List<NicSecondaryIpVO> secondaryIps = ApiDBUtils.findNicSecondaryIps(userVm.getNicId()); if (secondaryIps != null) { List<NicSecondaryIpResponse> ipList = new ArrayList<NicSecondaryIpResponse>(); for (NicSecondaryIpVO ip : secondaryIps) { NicSecondaryIpResponse ipRes = new NicSecondaryIpResponse(); ipRes.setId(ip.getUuid()); ipRes.setIpAddr(ip.getIp4Address()); ipList.add(ipRes); } nicResponse.setSecondaryIps(ipList); } nicResponse.setObjectName("nic"); userVmResponse.addNic(nicResponse); } } ''' Is there any
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---