mirror of
https://github.com/apache/cloudstack
synced 2026-08-08 15:48:29 +00:00
CLOUDSTACK-6672: [Automation] NPE observed while listing system vms
fixing NPE
This commit is contained in:
parent
3448ab7f1c
commit
8bcd2546ac
@ -1209,8 +1209,8 @@ 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) {
|
||||
Vlan vlan = ApiDBUtils.findVlanById(ip.getVlanId());
|
||||
vmResponse.setPublicIp(ip.getAddress().addr());
|
||||
vmResponse.setPublicNetmask(vlan.getVlanNetmask());
|
||||
vmResponse.setGateway(vlan.getVlanGateway());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user