CLOUDSTACK-6832: [OVS]vnet is not released even the network is deleted

fix ensures allocated VNET is released during network shutdown

(cherry picked from commit be937a0821)
This commit is contained in:
Murali Reddy 2014-06-13 17:03:28 +05:30 committed by Daan Hoogland
parent a951b51523
commit a4512c0f0c
1 changed files with 6 additions and 1 deletions

View File

@ -189,7 +189,12 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
return;
}
super.shutdown(profile, offering);
if (profile.getBroadcastDomainType() == BroadcastDomainType.Vswitch ) {
s_logger.debug("Releasing vnet for the network id=" + profile.getId());
_dcDao.releaseVnet(BroadcastDomainType.getValue(profile.getBroadcastUri()), profile.getDataCenterId(), profile.getPhysicalNetworkId(),
profile.getAccountId(), profile.getReservationId());
}
profile.setBroadcastUri(null);
}
@Override