CLOUDSTACK-5023: Deleting Port Forwarding Rule fails when generating usage events are enabled

This commit is contained in:
David Grizzanti 2013-11-01 11:40:32 -04:00 committed by Daan Hoogland
parent 89206094ae
commit d6420cd91e
1 changed files with 2 additions and 1 deletions

View File

@ -738,7 +738,8 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
}
if (generateUsageEvent && needUsageEvent) {
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_RULE_DELETE, rule.getAccountId(), 0, rule.getId(),
Network network = _networkModel.getNetwork(rule.getNetworkId());
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_RULE_DELETE, rule.getAccountId(), network.getDataCenterId(), rule.getId(),
null, rule.getClass().getName(), rule.getUuid());
}