Skip to content

Commit 40192cd

Browse files
author
Alena Prokharchyk
committed
CLOUDSTACK-6235 - return gateway/netmask of publicVlan, along with the EIP information, for system vms in EIP/ELB setup
1 parent b5c8a56 commit 40192cd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎server/src/com/cloud/api/ApiResponseHelper.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,11 @@ public SystemVmResponse createSystemVmResponse(VirtualMachine vm) {
11921192
NetworkOffering networkOffering = ApiDBUtils.findNetworkOfferingById(network.getNetworkOfferingId());
11931193
if (networkOffering.getElasticIp()) {
11941194
IpAddress ip = ApiDBUtils.findIpByAssociatedVmId(vm.getId());
1195+
Vlan vlan = ApiDBUtils.findVlanById(ip.getVlanId());
11951196
if (ip != null) {
11961197
vmResponse.setPublicIp(ip.getAddress().addr());
1198+
vmResponse.setPublicNetmask(vlan.getVlanNetmask());
1199+
vmResponse.setGateway(vlan.getVlanGateway());
11971200
}
11981201
} else {
11991202
vmResponse.setPublicIp(singleNicProfile.getIp4Address());

0 commit comments

Comments
 (0)