winterhazel commented on code in PR #10755:
URL: https://github.com/apache/cloudstack/pull/10755#discussion_r2059489049


##########
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:
   I moved them to `UsageEventUtils`. I think they fit better there.



-- 
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]

Reply via email to