DaanHoogland commented on code in PR #10755:
URL: https://github.com/apache/cloudstack/pull/10755#discussion_r2055850459
##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java:
##########
@@ -4780,6 +4781,27 @@ public void unmanageNics(VirtualMachineProfile vm) {
}
}
+ @Override
+ public void publishNetworkCreation(Network network) {
+ UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_CREATE,
network.getAccountId(), network.getDataCenterId(),
+ network.getId(), network.getName(),
network.getNetworkOfferingId(), null, null, null, network.getState().name(),
+ network.getUuid());
+ }
+
+ @Override
+ public void publishNetworkUpdate(Network network) {
+ UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_UPDATE,
network.getAccountId(), network.getDataCenterId(),
+ network.getId(), network.getName(),
network.getNetworkOfferingId(), null, network.getState().name(),
+ Network.class.getName(), network.getUuid(), true);
+ }
+
+ @Override
+ public void publishNetworkDeletion(Network network) {
+ UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_DELETE,
network.getAccountId(), network.getDataCenterId(),
+ network.getId(), network.getName(),
network.getNetworkOfferingId(), null, null, null,
+ Network.class.getName(), network.getUuid());
+ }
+
Review Comment:
can these be default implementations in the `interface
NetworkOrchestrationService`? Maybe we do not want the `NetworkEventUtils` in
there, but only a static method is called on that anyway.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]