Run diagnostics API UI integration for system VMs and VR#2833
Run diagnostics API UI integration for system VMs and VR#2833yadvr merged 3 commits intoapache:masterapache/cloudstack:masterfrom shapeblue:remote-diagnosis-uishapeblue/cloudstack:remote-diagnosis-uiCopy head branch name to clipboard
Conversation
|
@blueorangutan package |
|
@dhlaluku a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2281 |
|
@blueorangutan test |
|
@dhlaluku a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2981)
|
| @Override | ||
| public String getEventType() { | ||
| VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, getId()); | ||
| if (vm.getType() == VirtualMachine.Type.ConsoleProxy) { |
There was a problem hiding this comment.
it would be better to use a switch case instead of multiple if else, especially for comparing multiple enums
There was a problem hiding this comment.
Refactored to switch-case statements
ui/l10n/en.js
Outdated
| "label.rules":"Rules", | ||
| "label.run.diagnostics.type":"Type", | ||
| "label.run.diagnostics.destination":"Destination", | ||
| "label.run.diagnostics.extra":"Extra Args", |
There was a problem hiding this comment.
Spelling out the entire word looks more professional. Maybe just call it 'Arguments'?
There was a problem hiding this comment.
Changed Extra Args -> Extra Arguments
api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/RunDiagnosticsCmd.java
Show resolved
Hide resolved
| private NetworkOrchestrationService networkManager; | ||
|
|
||
| @Override | ||
| @ActionEvent(eventType = "", eventDescription = "running diagnostics on system vm", async = true) |
There was a problem hiding this comment.
Added a new event type "EVENT_SYSTEM_VM_DIAGNOSTICS = SYSTEM.VM.DIAGNOSTICS" and used that.
Notices that most system vm actions (reboot, destroy and so on) also have empty event types.
|
LGTM |
Description
This is a UI integration of the runDiagnostics API command that helps Admins troubleshoot network issues on CloudStack hosted networks by executing network-utility commands (ping, traceroute, arping) remotely on system VMs. #2721
FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Remote+Diagnostics+API
Types of changes
GitHub Issue/PRs
Screenshots (if appropriate):
Output

How Has This Been Tested?
As admin, log on to the CloudStack UI;
Navigate to Infrastructure > System VMs or Virtual Router
Click on the Run Diagnostics button and fill in the form that pops up.
See screenshots
Checklist:
Testing