mirror of https://github.com/apache/cloudstack.git
Revert "bug 9785: events around VLAN assign/release"
pulling out as action event is required not the usage event This reverts commit 7052e5451878a1595cb5b0d359a3a4482d9f9bc7.
This commit is contained in:
parent
8ad3fbf9d2
commit
9f93fee7b6
|
|
@ -161,8 +161,6 @@ public class EventTypes {
|
|||
// VLANs/IP ranges
|
||||
public static final String EVENT_VLAN_IP_RANGE_CREATE = "VLAN.IP.RANGE.CREATE";
|
||||
public static final String EVENT_VLAN_IP_RANGE_DELETE = "VLAN.IP.RANGE.DELETE";
|
||||
public static final String EVENT_ZONE_VLAN_CREATE = "ZONE.VLAN.CREATE";
|
||||
public static final String EVENT_ZONE_VLAN_DELETE = "ZONE.VLAN.DELETE";
|
||||
|
||||
// Configuration Table
|
||||
public static final String EVENT_CONFIGURATION_VALUE_EDIT = "CONFIGURATION.VALUE.EDIT";
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ import com.cloud.dc.dao.DataCenterDao;
|
|||
import com.cloud.dc.dao.VlanDao;
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
import com.cloud.deploy.DeploymentPlan;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.event.UsageEventVO;
|
||||
import com.cloud.event.dao.UsageEventDao;
|
||||
import com.cloud.exception.InsufficientAddressCapacityException;
|
||||
import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
|
|
@ -75,8 +72,6 @@ public class GuestNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
protected NicDao _nicDao;
|
||||
@Inject
|
||||
protected NetworkDao _networkDao;
|
||||
@Inject
|
||||
protected UsageEventDao _usageEventDao;
|
||||
|
||||
String _defaultGateway;
|
||||
String _defaultCidr;
|
||||
|
|
@ -159,10 +154,6 @@ public class GuestNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
if (vnet == null) {
|
||||
throw new InsufficientVirtualNetworkCapcityException("Unable to allocate vnet as a part of network " + network + " implement ", DataCenter.class, dcId);
|
||||
}
|
||||
|
||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_ZONE_VLAN_CREATE, network.getAccountId(), dcId, network.getId(), vnet);
|
||||
_usageEventDao.persist(usageEvent);
|
||||
|
||||
implemented.setBroadcastUri(BroadcastDomainType.Vlan.toUri(vnet));
|
||||
} else {
|
||||
implemented.setBroadcastUri(network.getBroadcastUri());
|
||||
|
|
@ -270,8 +261,6 @@ public class GuestNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
s_logger.debug("Releasing vnet for the network id=" + profile.getId());
|
||||
if (profile.getBroadcastUri() != null) {
|
||||
_dcDao.releaseVnet(profile.getBroadcastUri().getHost(), profile.getDataCenterId(), profile.getAccountId(), profile.getReservationId());
|
||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_ZONE_VLAN_DELETE, profile.getAccountId(), profile.getDataCenterId(), profile.getId(), profile.getBroadcastUri().getHost());
|
||||
_usageEventDao.persist(usageEvent);
|
||||
profile.setBroadcastUri(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue