ernjvr commented on a change in pull request #2833: Run diagnostics API UI
integration for system VMs and VR
URL: https://github.com/apache/cloudstack/pull/2833#discussion_r214799341
##########
File path:
api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/RunDiagnosticsCmd.java
##########
@@ -116,6 +122,28 @@ public long getEntityOwnerId() {
return Account.ACCOUNT_ID_SYSTEM;
}
+ @Override
+ public String getEventType() {
+ VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, getId());
+ if (vm.getType() == VirtualMachine.Type.ConsoleProxy) {
Review comment:
it would be better to use a switch case instead of multiple if else,
especially for comparing multiple enums
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services