mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-1573 listNics response update for not showing vlan to normal user
This commit is contained in:
parent
08f6a24d19
commit
1f97b528c5
@ -3659,7 +3659,10 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
|
||||
public NicResponse createNicResponse(Nic result) {
|
||||
NicResponse response = new NicResponse();
|
||||
NetworkVO network = _entityMgr.findById(NetworkVO.class, result.getNetworkId());
|
||||
|
||||
response.setId(result.getUuid());
|
||||
response.setNetworkid(network.getUuid());
|
||||
response.setIpaddress(result.getIp4Address());
|
||||
|
||||
if (result.getSecondaryIp()) {
|
||||
@ -3676,19 +3679,12 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
response.setGateway(result.getGateway());
|
||||
response.setId(result.getUuid());
|
||||
response.setGateway(result.getGateway());
|
||||
response.setNetmask(result.getNetmask());
|
||||
response.setMacAddress(result.getMacAddress());
|
||||
if (result.getBroadcastUri() != null) {
|
||||
response.setBroadcastUri(result.getBroadcastUri().toString());
|
||||
}
|
||||
if (result.getIsolationUri() != null) {
|
||||
response.setIsolationUri(result.getIsolationUri().toString());
|
||||
}
|
||||
|
||||
if (result.getIp6Address() != null) {
|
||||
response.setId(result.getIp6Address());
|
||||
response.setIp6Address(result.getIp6Address());
|
||||
}
|
||||
|
||||
response.setIsDefault(result.isDefaultNic());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user