diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 0b841ee04ca..189840d18ae 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -1133,6 +1133,7 @@ public class ApiResponseHelper implements ResponseGenerator { routerResponse.setPublicIp(singleNic.getIp4Address()); routerResponse.setPublicMacAddress(singleNic.getMacAddress()); routerResponse.setPublicNetmask(singleNic.getNetmask()); + routerResponse.setGateway(singleNic.getGateway()); } else if (network.getTrafficType() == TrafficType.Control) { routerResponse.setPrivateIp(singleNic.getIp4Address()); routerResponse.setPrivateMacAddress(singleNic.getMacAddress()); diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 7be0bc56b63..e01f417daa1 100644 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -1740,7 +1740,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian //because it happens just in case when this method is called as a part of account cleanup. //In all other cases return false router = _routerDao.findByNetworkConfigurationIncludingRemoved(network.getId()); - if (router != null && router.getState() == State.Destroyed && router.isRemoved()) { + if (router != null && (router.getState() == State.Destroyed || router.getState() == State.Expunging)) { return true; } s_logger.warn("Unable to associate ip addresses, virtual router doesn't exist in the network " + network.getId());