bug 7959: return gateway for domainRouter Api commands

status 7959: resolved fixed
This commit is contained in:
alena 2011-01-13 14:18:00 -08:00
parent 4536f4b65f
commit 13630923ab
2 changed files with 2 additions and 1 deletions

View File

@ -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());

View File

@ -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());