mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6072: Release VNIs when guest networks are destroyed
submitted-by: mail@ynojima.net
This commit is contained in:
parent
3787579d29
commit
c04fb68fc7
|
|
@ -414,13 +414,13 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
|
|||
@Override
|
||||
public void shutdown(NetworkProfile profile, NetworkOffering offering) {
|
||||
|
||||
if (profile.getBroadcastDomainType() == BroadcastDomainType.Vlan &&
|
||||
if ((profile.getBroadcastDomainType() == BroadcastDomainType.Vlan || profile.getBroadcastDomainType() == BroadcastDomainType.Vxlan) &&
|
||||
profile.getBroadcastUri() != null && !offering.getSpecifyVlan()) {
|
||||
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());
|
||||
ActionEventUtils.onCompletedActionEvent(CallContext.current().getCallingUserId(), profile.getAccountId(),
|
||||
EventVO.LEVEL_INFO, EventTypes.EVENT_ZONE_VLAN_RELEASE, "Released Zone Vlan: "
|
||||
EventVO.LEVEL_INFO, EventTypes.EVENT_ZONE_VLAN_RELEASE, "Released Zone vnet: "
|
||||
+ BroadcastDomainType.getValue(profile.getBroadcastUri()) + " for Network: " + profile.getId(), 0);
|
||||
}
|
||||
profile.setBroadcastUri(null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue