mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-6235 - return gateway/netmask of publicVlan, along with the EIP information, for system vms in EIP/ELB setup
This commit is contained in:
parent
b5c8a56eea
commit
40192cd8a1
@ -1192,8 +1192,11 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
NetworkOffering networkOffering = ApiDBUtils.findNetworkOfferingById(network.getNetworkOfferingId());
|
||||
if (networkOffering.getElasticIp()) {
|
||||
IpAddress ip = ApiDBUtils.findIpByAssociatedVmId(vm.getId());
|
||||
Vlan vlan = ApiDBUtils.findVlanById(ip.getVlanId());
|
||||
if (ip != null) {
|
||||
vmResponse.setPublicIp(ip.getAddress().addr());
|
||||
vmResponse.setPublicNetmask(vlan.getVlanNetmask());
|
||||
vmResponse.setGateway(vlan.getVlanGateway());
|
||||
}
|
||||
} else {
|
||||
vmResponse.setPublicIp(singleNicProfile.getIp4Address());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user